Mod_pagespeed waiting for completion

December 22, 2016 121 views
Apache WordPress Ubuntu 16.04

So I've done the Get Started with Mod_pagespeed tutorial to get it up and running on my server. Its been running fine, but recently, I did a server update and I've started to see these errors in my error log:

[Thu Dec 22 15:08:40.507954 2016] [pagespeed:error] [pid 8464] [mod_pagespeed @8464] [1222/] Unable to start worker thread

mmap() failed: [12] Cannot allocate memory

[Thu Dec 22 15:26:51.061235 2016] [pagespeed:warn] [pid 8464] [mod_pagespeed @8464] Waiting for completion of URL for 5 sec.
[Thu Dec 22 15:26:56.062444 2016] [pagespeed:warn] [pid 8464] [mod_pagespeed @8464] Waiting for completion of URL for 10.001 sec.
[Thu Dec 22 15:27:01.065288 2016] [pagespeed:warn] [pid 8464] [mod_pagespeed @8464] Waiting for completion of URL for 15.004 sec.
[Thu Dec 22 15:27:06.066581 2016] [pagespeed:warn] [pid 8464] [mod_pagespeed @8464] Waiting for completion of URL for 20.005 sec.

or another type is:
[Thu Dec 22 15:28:57.387171 2016] [pagespeed:warn] [pid 8464] [mod_pagespeed @8464] Response for url completed with status 500 Internal Server Error after being abandoned for timing out.

Abandoned URL after 120.041 sec (debug=ipro, driver=URL: \ndecodedbase:\nbasewasset: false\ncontainingcharset: \nfiltersadded: true\nexternallymanaged: false\nwaiting: kNoWait\nwaitingdeadlinereached: false\ndetachedrewrites.size(): 0\nRewritesComplete(): false\nfullyrewriteonflush: false\nfastblockingrewrite: true\nflushrequested: false\nflushoccurred: false\nflushedearly: false\nflushingearly: false\nislazyloadscriptflushed: false\nreleasedriver: false\nwritepropertycachedomcohort: false\nusingspdy: false\nownspropertypage: false\nxhtmlmimetypecomputed: false\ncanrewriteresources: true\nis_nested: false\nref counts:\n\tUser references: 1\tParsing: 0\tPending rewrites: 0\tDetached rewrites: 0\tDeleting rewrites: 0\tUser-facing fetch rewrite: 1\tBackground fetch rewrite: 0\tMisc async event: 0\tMisc async event that's render-blocking: 0).

Any ideas what is going on?

2 Answers

This line is a big clue:

mmap() failed: [12] Cannot allocate memory

Your droplet will likely see all kinds of processes being killed and things you don't expect when you exhaust all your available memory. You can use the command free -m to view the available memory on your system and you may want to consider upgrading to a larger droplet or trying a swap file so out of memory errors don't persist.

Thanks, Ryanpq!

Yea that makes total sense, I just had 100 people on the server at once when those errors started popping up + I'm running a Wordfence security plugin and jet pack and both of those eat up quite a lot of resources I've been noticing. When I resize the droplet tonight, I have to power it off - how long does it usually take to resize?

Have another answer? Share your knowledge.