I host two WordPress sites on a Windows 2019 Server, IIS 10, PHP 8.2 with FastCGI.
The two sites use exactly the same themes and plugins, in same versions.
One site works fine and the other generates 500 error on FastCGI with PHP 8.2, even when I deactivate all themes and plugins and use the default WordPress 2024 theme.
But it works fine if I swicth the FastCGI to use PHP 7.4.
When set with PHP 8.2:
I have enabled PHP error log: only deprecation level errors, and on both sites.
I have enabled WordPress debug log: only deprecation level errors, and on both sites.
I have enables Failed Trace Request log on IIS, I get this but I can’t find any valuable information inside.
You may need to view this error log file with Microsoft Edge and Internet Explorer compatibility mode.
If someone can give me a clue, or tell me which additionnal error logging feature I can use, it would be very helpful, as I am completely stucked here.
2
Answers
There was no error in PHP log but the Windows Event Viewer finally give me a hint.
The 500 error was due to a memory exception in the OPCache PHP optimization module.
I stopped IIS, cleared the OPCache cache directory, adjusted some OPCache settings, and everything is back on track.
Here are some common causes for this error:
The FastCGI process calls some sort of ExitProcess API, e.g. the C
exit() function
An unhandled exception occurs, e.g. Access Violation
You can use this link as a reference:
FastCGI: Debugging "The FastCGI process exited unexpectedly".