Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server crash when reloading page after cache:clear #28430

Closed
yoannk opened this issue Sep 10, 2018 · 6 comments
Closed

Server crash when reloading page after cache:clear #28430

yoannk opened this issue Sep 10, 2018 · 6 comments

Comments

@yoannk
Copy link

yoannk commented Sep 10, 2018

Symfony version(s) affected: 4.1.4

Description
Server crash when reloading page after cache:clear

How to reproduce
OS: Windows 10

composer create-project symfony/skeleton sf4
cd sf4
composer require profiler --dev
php -S 127.0.0.1:8000 -t public

Open localhost:8000 => the defaut page is showing
Execute command php bin/console cache:clear
Reload localhost:8000 => the server crash

When the profiler is not installed there is no crash

@xabbuh
Copy link
Member

xabbuh commented Sep 11, 2018

What does "crash" mean? Do you get an error message? And if so, can you please share it with us?

@yoannk
Copy link
Author

yoannk commented Sep 11, 2018

With the php built-in server there is no error message, with symfony server i got [ERROR] Server terminated unexpectedly.

@xabbuh
Copy link
Member

xabbuh commented Sep 11, 2018

Do you see any more information in the log files?

@yoannk
Copy link
Author

yoannk commented Sep 11, 2018

I added debug package with composer require debug and tried again, i got this error in dev.log

[2018-09-11 10:10:01] php.DEBUG: Warning: fsockopen(): unable to connect to 127.0.0.1:8000 (Une tentative de connexion a �chou� car le parti connect� n�a pas r�pondu convenablement au-del� d�une certaine dur�e ou une connexion �tablie a �chou� car l�h�te de connexion n�a pas r�pondu. ) {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\SilencedErrorContext: {\"severity\":2,\"file\":\"D:\\\\sf4\\\\vendor\\\\symfony\\\\web-server-bundle\\\\WebServerConfig.php\",\"line\":123,\"trace\":[{\"file\":\"D:\\\\sf4\\\\vendor\\\\symfony\\\\web-server-bundle\\\\WebServerConfig.php\",\"line\":54,\"function\":\"findBestPort\",\"class\":\"Symfony\\\\Bundle\\\\WebServerBundle\\\\WebServerConfig\",\"type\":\"->\"}],\"count\":1})"} []
[2018-09-11 10:10:21] php.DEBUG: Warning: unlink(D:\sf4\var\cache\de_/ContainerHDoRPm2.legacy): No such file or directory {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\SilencedErrorContext: {\"severity\":2,\"file\":\"D:\\\\sf4\\\\vendor\\\\symfony\\\\http-kernel\\\\Kernel.php\",\"line\":715,\"trace\":[{\"file\":\"D:\\\\sf4\\\\vendor\\\\symfony\\\\http-kernel\\\\Kernel.php\",\"line\":541,\"function\":\"dumpContainer\",\"class\":\"Symfony\\\\Component\\\\HttpKernel\\\\Kernel\",\"type\":\"->\"}],\"count\":1})"} []
[2018-09-11 10:10:28] console.DEBUG: Command "server:run" exited with code "1" {"command":"server:run","code":1} []

@yoannk
Copy link
Author

yoannk commented Sep 12, 2018

I noticed that if i run a command after cache:clear, for example security:check i can reload the page without causing the server to crash.

@yoannk
Copy link
Author

yoannk commented Nov 5, 2018

The issue was caused by apc.enable_cli=1 in my php.ini, with this line commented out cache:clear works fine.

@yoannk yoannk closed this as completed Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants