Symfony – does not have a registered handler / out of free disk space

Last night I started getting down time alerts from New Relic on our Symfony based Application. Our production server went down and while investigating PuTTY started giving me “Out of disk space” error

Out of disk space

An error similar to:-

PHP Warning: file_put_contents() : Only 0 of 36492 bytes written, possibly out of free disk space in /usr/lib/php/framework/symfony/lib/autoload/sfSimpleAutoload.class.php on line 165

Looking into message a little closer I found that the server had ran out of disk space so after making some space and using “symfony cc” to clear the cache i thought that this would have resolved the problem, however i continued to get below message “does not have a registered handler” being presented.

Fatal error: Uncaught exception ‘sfConfigurationException’ with message ‘Configuration file “/usr/lib/php/framework/symfony/config/config/settings.yml, /home/portal/www/site/apps/frontend/config/settings.yml” does not have a registered handler.”

After investigating closely I found the cache was not cleared properly even after running ‘symfony cc’.

Clear the Cache

At the end, i had to clear the cache manually with below command :-

rm -fr cache/*

For some reason this seemed to work fine where as the “symfony cc” command didn’t work therefore the only conclusion that I could come up with is that when the server ran out of disk space it corrupted something in the symfony cache which either is not normally cleared with a “symfony cc” and as a result i needed to remove it completely so symfony could re-build it automatically.

'Coz sharing is caring

By Swatantra Kumar

Swatantra is an engineering leader with a successful record in building, nurturing, managing, and leading a multi-disciplinary, diverse, and distributed team of engineers and managers developing and delivering solutions. Professionally, he oversees solution design-development-delivery, cloud transition, IT strategies, technical and organizational leadership, TOM, IT governance, digital transformation, Innovation, stakeholder management, management consulting, and technology vision & strategy. When he's not working, he enjoys reading about and working with new technologies, and trying to get his friends to make the move to new web trends. He has written, co-written, and published many articles in international journals, on various domains/topics including Open Source, Networks, Low-Code, Mobile Technologies, and Business Intelligence. He made a proposal for an information management system at the University level during his graduation days.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.