You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception "Your hydrator directory must be writable." occurs for a directory that definitely is writable. The exception occurs from time to time when a directory needs to be created and looks like a race condition.
I originally got an exception on the production server when I was doing the deployment of the new version. At the moment I switched the app to the new directory /some/path/temp, I got an exception Your hydrator directory must be writable.
Later I was able to reproduce this in my stage environment. I first remove /some/path/temp/doctrine directory and then run: ab -c 50 -n 50 https://.... After several tries I get an exception "Your hydrator directory must be writable." in the app logs.
Expected behavior
The directory is created without any exceptions.
The text was updated successfully, but these errors were encountered:
The easiest solution is to avoid this race condition altogether and have the folders created before ODM tries to do so itself. Is that an option? There also was a schoold of pre-generating all hydrators/proxies before during deployment :)
If I generate hydrators and proxies when I build the app before the deployment, can I leave the directories for them read-only in that case? The application code and all dependencies are not changed after the build. Build and deploy are performed on different machines.
Bug Report
Summary
Exception "Your hydrator directory must be writable." occurs for a directory that definitely is writable. The exception occurs from time to time when a directory needs to be created and looks like a race condition.
The code that throws the exception is similar to this:
https://github.com/kalessil/phpinspectionsea/blob/master/docs/probable-bugs.md#mkdir-race-condition
Current behavior
I got the following exception for a directory that definitely was writable:
How to reproduce
Your hydrator directory must be writable.
ab -c 50 -n 50 https://...
. After several tries I get an exception "Your hydrator directory must be writable." in the app logs.Expected behavior
The directory is created without any exceptions.
The text was updated successfully, but these errors were encountered: