When I tried to access my site, suddenly I could not access it anymore. I checked my error log and found this.

[Sun Jul 19 03:10:01.233369 2015] [auth_digest:notice] [pid 2570] AH01757: generating secret for digest authentication ...
[Sun Jul 19 03:10:01.233948 2015] [lbmethod_heartbeat:notice] [pid 2570] AH02282: No slotmem from mod_heartmonitor
[Sun Jul 19 03:10:01.250268 2015] [mpm_prefork:notice] [pid 2570] AH00163: Apache/2.4.12 (Amazon) PHP/5.4.41 configured -- resuming normal operations
[Sun Jul 19 03:10:01.250288 2015] [core:notice] [pid 2570] AH00094: Command line: '/usr/sbin/httpd'
[Mon Jul 20 01:16:46.175258 2015] [suexec:notice] [pid 2567] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Jul 20 01:16:46.198570 2015] [auth_digest:notice] [pid 2570] AH01757: generating secret for digest authentication ...
[Mon Jul 20 01:16:46.199282 2015] [lua:error] [pid 2570] (17)File exists: AH02665: mod_lua: Failed to create shared memory segment on file /tmp/httpd_lua_shm.2570
[Mon Jul 20 01:16:46.199302 2015] [:emerg] [pid 2570] AH00020: Configuration Failed, exiting

Then, I tried to restart the httpd service. I saw this

Stopping httpd:                  [  Failed ]
Starting httpd:                  [  OK  ]

After restarting the service, I can now access again my site.

What seems to be the problem here? I'm sure that I did not touch or restart the server. Can somebody explain what I have experienced, and how can I prevent it from happening again? I don't what my users to find they can't access my site.

Here is some relevant info:

Server version: Apache/2.4.12 (Amazon)
Server built:   Mar 18 2015 20:24:15
  • With out more info it looks like Apache is trying to use SHM and doesn't have permissions, or maybe you out of memory, then mod_lua crashes, till you restart Apache. – coteyr Jul 21 '15 at 9:14

With out more information your error seems to be related to:

(17)File exists: AH02665: mod_lua: Failed to create shared memory segment on file /tmp/httpd_lua_shm.2570

Then your site becomes unresponsive because mod_lua is no longer running.

AH00020: Configuration Failed, exiting

Restarting Apache fixes the dead worker process. Reloading would probably "fix" it too. Your first step to correcting the problem is to figure out why mod_lua can't make the file. Is it a bug (tries to open the file twice), is it a permission problem (apache user can't access the file), or a system problem (the file exists because a thread is still using it even though it shouldn't be i.e. a zombie process). The error may not be accurate. It may not be that the file exists but something else. You need to track that down first. Also use something like lsof to see why that file exists and is not being deleted.

A simple restart of the server may fix the issue if it's a zombie process, but I would file a bug against mod_lua. If it can't make a temp file it should just use another one. The 2570 seem like apache's PID though. So maybe try killing apache totally then starting it (apache) again.

  • Thank you for your answer, well I'm sure that its not because memory is out, since its still in development period so nobody is using it except me and during that time I'm just trying to open the site. Secondly I don't have any scheduled task yet. This is the first time it happen so I'm totally clueless. I read somewhere that httpd restart regularly, but why suddenly after 2 months of observation period. If you can direct me what should I do, it would be much appreciated. By the way I'm not really an expert with regards to server setting, so I'm not really sure what is that mod_lua :D Thanks! – Markipe Jul 22 '15 at 0:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.