Search code examples
symfonyvirtual-machinevmwaresymfony4http-status-code-500

HTTP 500, blank pages, cache not refreshed in Symfony 4 on VMware


I'm developing a Symfony 4.3 app. I'm running it with symfony server:start inside a Fedora VM running on VMware Workstation Player on Windows 10.

My files are located on the host (Windows) and accessed by the Linux host via VMware shared folders.

This has been working fine for years for all my daily development needs, but Symfony does not seem to like this setup.

First of all, after pretty much every modification to a file, I have to run bin/console cache:clear and/or restart the Symfony server or my modifications are not taken into account.

I'm also getting random HTTP 500 responses, with nothing but a blank page, and no exception trace in the Symfony server console:

Jul 25 12:29:34 |ERROR| SERVER GET (500) /...

In this case, clearing the cache & restarting the Symfony server also fixes the problem.

I'm really surprised by these issues that make development horribly slow and irritating, and wonder what can cause them. It's very likely due to accessing the files via shared folders, but I do not have any issue with other applications not based on Symfony: querying file modification times works fine, opcache works fine, so I don't know what can confuse Symfony here.

Any hint on how to solve the problem?


Solution

  • The problem did not lie with the VMware shared folders, but with the memprof extension that is causing issues when the Symfony profiler is active.

    See: https://github.com/symfony/symfony/issues/32753

    I disabled the memprof extension and everything is back to normal.