Skip to content

Server crash when reloading page after cache:clear #28430

Closed
@yoannk

Description

@yoannk

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

Activity

xabbuh

xabbuh commented on Sep 11, 2018

@xabbuh
Member

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

yoannk

yoannk commented on Sep 11, 2018

@yoannk
Author

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

xabbuh

xabbuh commented on Sep 11, 2018

@xabbuh
Member

Do you see any more information in the log files?

yoannk

yoannk commented on Sep 11, 2018

@yoannk
Author

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

yoannk commented on Sep 12, 2018

@yoannk
Author

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

yoannk commented on Nov 5, 2018

@yoannk
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @xabbuh@carsonbot@yoannk

        Issue actions

          Server crash when reloading page after cache:clear · Issue #28430 · symfony/symfony