I'm encountering an problem that's departing me inside a stalemate so consequently, I use you! Lately a Symfony application continues to be heading down rendering an interior apache error -500. After removing the Symfony cache the website returns up. Upon some additional looking into I've discovered the mistake of "Premature finish of script headers: php5". They have not created any errors such as this in over 1year and that we haven't made any changes for this site which is new regularly(once per week). This is in the log files.
[Sat Aug 28 06:20:30 2010] [error] [client 188.8.131.52] Premature end of script headers: php5
This email seemed to be sent lately from MT, possibly related which i feel may directly connect with the problem.
It's arrived at our attention that the service ----.com, continues to be producing an abnormally many file system locks around the cluster which hosts your bank account. Websites or scripts which utilize NFS file securing improperly can frequently generate this error, which inordinately affects the performance from the cluster for other clients. This can be a breach in our AUP that exist at 'http://mediatemple.internet/company/legal/aup_general.php'.
We monitored the file securing problem towards the following file that is being locked frequently:
/domain names/----.com/symfony/cache/frontend/push/config/routing/symfony.routing.configuration.cache /domain names/----.com/symfony/cache/frontend/push/config/routing/symfony.routing.data.cache
We advise you instantly disable file securing for the scripts when the choice is available (frequently situated within the configuration portion of the script) or make use of a different script which doesn't utilize file securing. Any future securing abuse with this script may lead to the suspension of visitors to this domain to avoid the securing from affecting other clients.
For those who have any queries in regards to this file securing problem, or aren't sure where to start with crippling file securing, please react to this ticket for more assistance.
I believe it's safe that you should disable Symfony's cache securing for reads in
lib/cache/sfFileCache.class.php in method
read(). Symfony requires a share lock when reading through. The lock is not required because Symfony utilizes a temporal file and relabel when writing. Also, in
lib/log/sfFileLogger.class.php the secure
doLog() method is not required, because the write is atomic (single
fwrite() call), and also the file is opened up in append mode.
I've not examined how these changes would affect Symfony.
"Premature finish of script headers" isn't a PHP error message. The net server is giving this message once the after sales (PHP within this situation) doesn't send headers. This is probably since it dies of all time able to perform anything. You need to locate PHP error log and find out the actual error message. However, observe that Symfony uses lots of
@ for error suppression in function calls to not find anything.
Lately I experienced similar problem. Changing file caching with APC solved my problems completely. I desired to exchange sfFileCache for view_cache, i18n cache and routing.
If APC isn't on your server than it is simple to use every other popular accelerator rather.
Using APC with symfony: http://www.zalas.eu/symfony-meets-apc-alternative-php-cache