We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40131
    • 40 Posts
    I am struggling with major site slowdown in every aspect. All pages take to load in 10-30+ sec when uncached.
    The configuration is: own dedicated server with no other activity or load:
    AMD Athlon(tm) II X4 605e Quad-core Processor 2.3Ghz
    8 GB Ram
    1TB HDD
    MODX Revo 2.2.6-pl (Traditional)

    OS: Debian squeeze (custom compiled)
    Server API FPM/FastCGI
    XCache v3.0.1
    PHP Version 5.4.11
    apache 2.2
    MySQL 5.1.66-0+squeeze1-log
    pdo_mysql - mysqlnd 5.0.10 - 20111026

    The site has 3 language version/context; the following is used and enabled:
    • The site has about 2000 pages distributed in 3 languages, and everything will grow.
    • Almost no custom snippets or something that could be suspicious. Mostly everything is done with GetResources and wayfinder menus /cached/
    • It seems that phpthumbof produces hi-server load during generation
    • Almost all snippets are cached
    • Only login, registration, formit and advanced search are uncached. They are not an issue here
    • GetCache is used on major categories (for getresources calls)
    • CacheMaster is enabled
    • phpThumbOfCacheManager plugin is disabled

    We swapped from other production server but slowdown of page loads persists. MySQL usually takes 0.2 microseconds where the PHP application takes at least 5 - 10 sec or much more on every page even with no dynamic content, but only [[*content]] and cached wayfinder menus.

    The site work much better and fast on a shared hosting production server, it is still slow but not as much as on the dedicated production server where the nightmare is.
    We tried everything - with or without memcache, xcache, Apache PHP handler vs FastCGI, and other optimizations with no result so far.

    The strangest moment is that the pages load just in a snap. I mean - the pages are not loading gradually in the browser, like streaming the php output to browser, to justify the user waiting time, but all pages load instantly after are serious waiting time. This is pretty annoying and leaves and impression of not responding server.
    I believe that the problem lies somewhere deep in the linux configuration and hope that the server power is still good?
    I am not sysadmin, nor PHP programmer overall.

    Any advice what to check will be greatly appreciated. I am able to negotiate a paid consultation as well from a MODX Guru willing to help.
    [ed. note: nickyz last edited this post 13 years, 6 months ago.]
      • 42967
      • 143 Posts
      Have you enabled Database Cache and Database sessions Cache?
        Eighth day design
        Design agency with offices in Edinburgh and Brighton
        • 40131
        • 40 Posts
        Quote from: eighthday at Mar 07, 2013, 07:50 AM
        Have you enabled Database Cache and Database sessions Cache?

        with or without
        cache_db
        cache_db_session

        set to YES/NO makes no difference at all.
          • 43072
          • 4 Posts
          Wow—that's pretty awful. I'm no guru either, but I'd try to find out where the slowdown is occurring (some Linux config, Apache, PHP, MySQL,…). Is there some kind of I/O bottleneck (disk, RAM, network)? Tried memcache?

          What about creating a different machine on Linode (say Ubuntu and use Linode recommended settings for the LAMP stack) and see if your problem persists.

          Try using Nginx instead of Apache?
            • 40889
            • 2 Posts
            Have you run a process viewer such as htop or top on the server while accessing the site, to see what process is responsible for the holdup? If something is using 90-100% cpu that's usually the culprit.

            A wild guess is that it can be related to phpThumbOf and ImageMagick. ImageMagick can run amok under some server configurations depending on how the client software (phpThumbOf) uses it.

            If you use a process viewer while accessing the site and see that the ImageMagick process (convert) is using a lot of CPU, then that's a part of the problem. The other part would be that somehow phpThumbOf is regenerating images constantly.