• I have recently created a new WordPress site as a replacement for an existing site that used a CMS called Pressroom (may have been custom made).

    The client is not happy with the performance.

    It’s a busy site with lots of visitors. Of course his brief cites premium websites like GQ, Zoo magazine, Broadsheet, the New Yorker. He wants lots of features — advertising, sliders, multiple internal blog feeds, event calendar. Most of these I have achieved with plugins.

    I use WP-Rocket for caching and currently all images are served via Cloudfront.

    I suggested upgrade his hosting, but then received a call from his host (they’re tight) who gave me a serve for daring to suggest his hosting services were in anyway inferior (for the record, I didn’t suggest that, merely an upgrade).

    I’ve been running in circles reducing the number of plugins and consolidating for two weeks and don’t see any real improvements.

    So am wondering if some experts can give me some cold hard facts:

    (1) I ran a phpinfo.php from his server and it appears to be running 128Mb. Is that enough for a busy site? Suggestions?
    (2) I ran some tests using Blazemeter and LoadImpact and the site really wigs out once there are about 12 concurrent visitors. (I may not be reading those results quite right.) Is that related to memory (or lack of it).
    (3) Strangely, using Blazemeter seems to test okay using www but gets lots of 500 errors when using naked domain. ???
    (4) Page speed tests like Pingdom and GTMetrix test okay — not briliant, around average, and considerably better than the sites cited in his brief. I am happy with that. if I need to I’ll get WP-Rocket to configure caching professionally, but I want to work through any other issues first.
    (5) I phone-conferenced the webhost turning plugins on and off while he watched resource usage and, from where I sit, it didn’t make a great deal of difference. It may have made marginal differences, but I think people hitting the site is where the spikes (and timeouts) are occuring.
    (6) The resource usage seems to climb steeply when an admin is logged in and working. Is that normal?

    I really can’t afford to keep troubleshooting a problem that may not even exist — if you want all those features, there’s a cost, right? The host seems to think (and therefore has convinced the client) that the site should run fine on the specs he is providing. At the moment, it feels like I’ve lost control of the project because the parameters are being driven by the hosting package, not by the client’s brief.

    Any thoughts appreciated.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator James Huff

    (@macmanx)

    128 should be enough, but in this case I’d recommend trying to boost it to 256.

    Here are three ways to increase PHP’s memory allocation:

    1. If you can edit or override the system php.ini file, increase the memory limit. For example, memory_limit = 256M

    2. If you cannot edit or override the system php.ini file, add php_value memory_limit 256M to your .htaccess file.

    3. If neither of these work, it’s time to ask your hosting provider to temporarily increase PHP’s memory allocation on your account. If your hosting provider won’t accommodate you, perhaps it’s time to find a new hosting provider.

    (in the above examples, the limit is set to 256MB)

    Thread Starter sasocreative

    (@sasocreative)

    Thanks James. Memory is set to 256M via wp-config. Don’t have access to php.ini

    Will memory set in htaccess or wp-config override what is set in the php allocation?

    Moderator James Huff

    (@macmanx)

    Setting it via wp-config.php won’t help. That tells WordPress to use up to 256MB of available memory, but it doesn’t increase the amount of available memory. If anything it actually *limits* WordPress, which without that line will try to use as much memory as is available.

    You have to increase PHP’s memory allocation, either via php.ini or .htaccess, to increase available memory.

    Thread Starter sasocreative

    (@sasocreative)

    OK, thanks for clarifying that.

    Moderator James Huff

    (@macmanx)

    You’re welcome!

    Thread Starter sasocreative

    (@sasocreative)

    I haven’t been able to resolve this and it seems to be getting worse. In fact, generally speaking, if more than one person is logged in, the site crumbles and the backend just starts throwing 500 errors.

    I installed Query Monitor to try to see what is going on. When logged in (say, in the Dashboard), it’s telling me that around 100MB memory is being used.

    Can someone clarify for me: does that mean that every logged in user will require 100MB of available memory? So if php.ini is set to 256MB, it’ll only take 3 people to max out memory? Or is that a total misinterpretation of what Query Monitor is showing me?

    Moderator James Huff

    (@macmanx)

    No, that just means that some process in the Dashboard is using 100MB, it has nothing to do with visitors to the front end.

    What do you see in your server error log at the exact date/time you see a 500 error?

    Thread Starter sasocreative

    (@sasocreative)

    Thanks James,

    It’s hard to pinpoint the exact time, and I’m not entirely sure what I’m looking for, but here’s a sample.

    [Tue Feb 02 10:20:33 2016] [warn] [client 120.152.172.25] mod_fcgid: stderr: PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set ‘always_populate_raw_post_data’ to ‘-1’ in php.ini and use the php://input stream instead. in Unknown on line 0, referer: https://www.filmink.com.au/
    [Tue Feb 02 10:20:54 2016] [error] mod_hostinglimits:Error on LVE enter: LVE(10158) HANDLER(fcgid-script) HOSTNAME(www.filmink.com.au) URL(/wp-admin/admin-ajax.php) TID(274073) errno (7) Read more: https://e.cloudlinux.com/MHL-E2BIG min_uid (0)
    [Tue Feb 02 10:20:56 2016] [error] mod_hostinglimits:Error on LVE enter: LVE(10158) HANDLER(fcgid-script) HOSTNAME(www.filmink.com.au) URL(/index.php) TID(250337) errno (7) Read more: https://e.cloudlinux.com/MHL-E2BIG min_uid (0)
    [Tue Feb 02 10:20:56 2016] [error] mod_hostinglimits:Error on LVE enter: LVE(10158) HANDLER(fcgid-script) HOSTNAME(www.filmink.com.au) URL(/index.php) TID(276536) errno (7) Read more: https://e.cloudlinux.com/MHL-E2BIG min_uid (0)
    [Tue Feb 02 10:21:05 2016] [error] mod_hostinglimits:Error on LVE enter: LVE(10158) HANDLER(fcgid-script) HOSTNAME(www.filmink.com.au) URL(/index.php) TID(268562) errno (7) Read more: https://e.cloudlinux.com/MHL-E2BIG min_uid (0)
    [Tue Feb 02 10:21:06 2016] [error] mod_hostinglimits:Error on LVE enter: LVE(10158) HANDLER(fcgid-script) HOSTNAME(www.filmink.com.au) URL(/index.php) TID(268562) errno (7) Read more: https://e.cloudlinux.com/MHL-E2BIG min_uid (0)
    [Tue Feb 02 10:21:07 2016] [error] mod_hostinglimits:Error on LVE enter: LVE(10158) HANDLER(fcgid-script) HOSTNAME(www.filmink.com.au) URL(/index.php) TID(278354) errno (7) Read more: https://e.cloudlinux.com/MHL-E2BIG min_uid (0)
    [Tue Feb 02 10:21:09 2016] [error] mod_hostinglimits:Error on LVE enter: LVE(10158) HANDLER(fcgid-script) HOSTNAME(www.filmink.com.au) URL(/index.php) TID(278363) errno (7) Read more: https://e.cloudlinux.com/MHL-E2BIG min_uid (0)
    [Tue Feb 02 10:21:10 2016] [error] mod_hostinglimits:Error on LVE enter: LVE(10158) HANDLER(fcgid-script) HOSTNAME(www.filmink.com.au) URL(/index.php) TID(276503) errno (7) Read more: https://e.cloudlinux.com/MHL-E2BIG min_uid (0)
    [Tue Feb 02 10:21:10 2016] [error] mod_hostinglimits:Error on LVE enter: LVE(10158) HANDLER(fcgid-script) HOSTNAME(www.filmink.com.au) URL(/wp-admin/admin-ajax.php) TID(274073) errno (7) Read more: https://e.cloudlinux.com/MHL-E2BIG min_uid (0)
    [Tue Feb 02 10:21:12 2016] [warn] [client 178.83.157.161] mod_fcgid: stderr: PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set ‘always_populate_raw_post_data’ to ‘-1’ in php.ini and use the php://input stream instead. in Unknown on line 0, referer: https://www.filmink.com.au/reviews/the-absent-one-film/
    [Tue Feb 02 10:22:48 2016] [error] [client 54.165.176.73] ModSecurity: Access denied with code 403 (phase 2). Pattern match “python-requests/” at REQUEST_HEADERS:User-Agent. [file “/etc/httpd/modsecurity.d/20_asl_useragents.conf”] [line “194”] [id “332039”] [rev “4”] [msg “Atomicorp.com WAF Rules: Suspicious Unusual User Agent (python-requests). Disable this rule if you use python-requests/. “] [severity “CRITICAL”] [hostname “filmink.com.au”] [uri “/feed/news/”] [unique_id “Vq-oyBtvWgQABDOZV84AAABs”]
    [Tue Feb 02 10:24:26 2016] [error] [client 54.91.118.98] ModSecurity: Access denied with code 403 (phase 2). Match of “rx (https://bsalsa\\\\.com|^site24x7)” against “REQUEST_HEADERS:User-Agent” required. [file “/etc/httpd/modsecurity.d/20_asl_useragents.conf”] [line “297”] [id “330094”] [rev “5”] [msg “Atomicorp.com WAF Rules: Fake User Agent String”] [severity “CRITICAL”] [hostname “www.filmink.com.au”] [uri “/features/super-sucker/”] [unique_id “Vq-pKhtvWgQABEBMJfkAAAAH”]

    And

    [Tue Feb 02 10:40:02 2016] [error] mod_hostinglimits:Error on LVE enter: LVE(10158) HANDLER(fcgid-script) HOSTNAME(www.filmink.com.au) URL(/wp-admin/admin-ajax.php) TID(282227) errno (7) Read more: https://e.cloudlinux.com/MHL-E2BIG min_uid (0)
    [Tue Feb 02 10:40:02 2016] [error] mod_hostinglimits:Error on LVE enter: LVE(10158) HANDLER(fcgid-script) HOSTNAME(www.filmink.com.au) URL(/wp-admin/admin-ajax.php) TID(282201) errno (7) Read more: https://e.cloudlinux.com/MHL-E2BIG min_uid (0)
    [Tue Feb 02 10:40:06 2016] [warn] [client 141.8.143.199] mod_fcgid: stderr: PHP Fatal error: Out of memory (allocated 40894464) (tried to allocate 5120 bytes) in /var/www/vhosts/filmink.com.au/httpdocs/wp-content/plugins/woocommerce/includes/widgets/class-wc-widget-price-filter.php on line 110
    [Tue Feb 02 10:40:08 2016] [error] [client 96.248.224.82] File does not exist: /var/www/vhosts/filmink.com.au/httpdocs/favicon.ico, referer: https://cuedotconfessions.blogspot.com.au/2015/03/mqff-notes-helicopter-mom-2014-dir.html
    [Tue Feb 02 10:40:10 2016] [error] [client 173.255.233.124] ModSecurity: Access denied with code 403 (phase 1). Matched phrase “TRACE” at REQUEST_METHOD. [file “/etc/httpd/modsecurity.d/10_asl_rules.conf”] [line “48”] [id “340002”] [rev “3”] [msg “Atomicorp.com WAF Rules: TRACE/TRACK method denied”] [severity “CRITICAL”] [hostname “www.filmink.com.au”] [uri “/”] [unique_id “Vq-s2htvWgQAA-WahB0AAABE”]
    [Tue Feb 02 10:40:17 2016] [error] [client 173.255.233.124] File does not exist: /var/www/vhosts/filmink.com.au/httpdocs/404javascript.js, referer: https://www.google.com/url/?sa=t
    [Tue Feb 02 10:40:23 2016] [warn] [client 173.255.233.124] mod_fcgid: stderr: PHP Fatal error: Out of memory (allocated 39845888) (tried to allocate 126 bytes) in /var/www/vhosts/filmink.com.au/httpdocs/wp-includes/plugin.php on line 107, referer: https://www.google.com/url/?sa=t
    [Tue Feb 02 10:40:25 2016] [warn] [client 120.151.176.169] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: https://www.filmink.com.au/wp-admin/edit.php?post_type=banners

    Moderator James Huff

    (@macmanx)

    Yeah, that won’t do any good. We’ll need the error recorded at the exact time the 500 was seen.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Memory issues’ is closed to new replies.