DDC-2613: Proxy generation in multiprocess environment #3280

Open
opened 2026-01-22 14:17:10 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Aug 15, 2013).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user deatheriam:

{panel}
\Doctrine\ORM\Proxy\ProxyFactory::_generateProxyClass fails to rename temporary proxy files when proxies are generated on demand in multiprocess environment using Process Control extension under Linux (http://www.php.net/manual/en/book.pcntl.php). 'Message: rename(../cache/Proxy/Dlayer/__CG__DlayerEntityInventory.php.520d1708631ed2.21378588,/../cache/Proxy/Dlayer/_CG_DlayerEntityInventory.php): No such file or directory' message is given.
{panel}

  • It seems that when two parallel processes are trying to generate a proxy for the same entity, the uniqid function does not create unique temporary file names per process.
  • Also the check should be made at the time of renaming to make sure that the proxy with the same name was not already created in a parallel process.
Originally created by @doctrinebot on GitHub (Aug 15, 2013). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user deatheriam: {panel} \Doctrine\ORM\Proxy\ProxyFactory::_generateProxyClass fails to rename temporary proxy files when proxies are generated on demand in multiprocess environment using Process Control extension under Linux (http://www.php.net/manual/en/book.pcntl.php). 'Message: rename(../cache/Proxy/Dlayer/__CG__DlayerEntityInventory.php.520d1708631ed2.21378588,/../cache/Proxy/Dlayer/__CG_\_DlayerEntityInventory.php): No such file or directory' message is given. {panel} - It seems that when two parallel processes are trying to generate a proxy for the same entity, the uniqid function does not create unique temporary file names per process. - Also the check should be made at the time of renaming to make sure that the proxy with the same name was not already created in a parallel process.
admin added the Bug label 2026-01-22 14:17:10 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3280