All PHP sites stopped working on IIS7, internal server error 500
- by TimothyP
I installed multiple drupal 7 sites using the Web Platform Installer on Windows Server 2008.
Until know they worked without any problems, but recently internal server error 500 started to show up (once every so many requests), now it happens for all requests to any of the php sites.
There's not much detail to go on, and nothing changed between the time when it was working and now (well nothing I know of anyway)
The log file is flooded with messages such as
[09-Aug-2011 09:08:04] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
[09-Aug-2011 09:08:16] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
[09-Aug-2011 09:08:16] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
[09-Aug-2011 09:08:20] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
[09-Aug-2011 09:08:22] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
[09-Aug-2011 09:08:51] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
[09-Aug-2011 09:09:56] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
[09-Aug-2011 09:09:57] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
[09-Aug-2011 09:12:13] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
[09-Aug-2011 09:15:09] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
[09-Aug-2011 09:15:09] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
[09-Aug-2011 09:21:28] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
[09-Aug-2011 09:21:28] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
I have tried increasing the memory limit in php.ini as such:
memory_limit = 512MB
But that doesn't seem to solve the problem either.
This is in the global php configuration in IIS
When I looked at the sites one by one, I noticed that PHP seemed to have been disabled.
PHP is not enabled. Register new PHP version to enable PHP via FastCGI
So I tried to register the php version again
C:\Program Files\PHP\v5.3\php-cgi.exe
But when I try to apply the changes I get
There was an error while performing this operation
Details: Operation is not valid due to the current state of the object
There doesn't seem to be any other information than that.
I have no idea why all of a sudden php isn't available for the sites anymore.
PS: I have rebooted IIS, the server, etc...
This server is hosted on amazon S3, so I gave the server some more power
Update
These seem to be two different issues
I used memory_limit=128MB instead of memory_limit=128M
Notice the "M" instead of "MB"
A memory_limit of 128M was not enough, had to increase it to 512M
The first issue caused internal server errors for every request.
Increasing to 512MB seemed to have solved the problem for a little while,
but after a while the server errors return. Note that the PHP manager inside of IIS still shows there is no PHP available for the sites (the global config does see it as available)
So the problem remains unsolved