Reputation: 346290
I'm developing a PHP app and and want to cache some data in APC. APC is running and enabled, I can see statistics when I open apc.php which indicate that opcode caching works fine.
However, the apache process crashes whenever I try to use apc_store()
or apc_add()
to store some data.
This is on a Windows 7 Professional 64bit system and happens with both of these version combinations:
With the first configuration, the crash happens immediately and this in the apache error log:
[Fri Jun 08 12:51:58 2012] [notice] Parent: child process exited with status 255 -- Restarting.
With second there is some delay and I get this:
[Fri Jun 08 16:18:48 2012] [notice] Child 5052: Exit event signaled. Child process is ending.
[Fri Jun 08 16:18:48 2012] [warn] (OS 995)Der E/A-Vorgang wurde wegen eines Threadendes oder einer Anwendungsanforderung abgebrochen. : winnt_accept: Asynchronous AcceptEx failed.
[Fri Jun 08 16:18:48 2012] [warn] (OS 10038)Ein Vorgang bezog sich auf ein Objekt, das kein Socket ist. : setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed.
[Fri Jun 08 16:18:52 2012] [warn] pid file C:/wamp/bin/apache/apache2.2.22/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Jun 08 16:18:52 2012] [notice] Apache/2.2.22 (Win64) PHP/5.3.13 configured -- resuming normal operations
What can be done to fix this?
Upvotes: 1
Views: 922
Reputation: 346290
Seems like the array I wanted to store contained a native resource, and that caused the crash.
Using serialize()
before storing it and unserialize()
afterwards fixed the problem.
Upvotes: 1