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
I have found and read these issues #8629 and #7078 and I experience the same problems still.
It is a Windows issue - I have a synchronization cli application using symfony/console and symfony/process launching around 4-5K processes a day. It was built and tested on linux and deployed on Windows 2008 Server R2 for production.
The main application is launched by Windows Task Scheduler and using an internal cron-like procedure it launches processes at certain times to sync data between servers.
It worked for a few months then it stopped and was unable to launch even manually.
Looking into the thing and debugging the main process I have found that I was getting this 'A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable.' exception. I looked up the TEMP directory and I have found around 120,000 temporary files inside (most of them 0 bytes).
Looking for the origin I was thrown off-track because I the Process::STDOUT => tempnam(sys_get_temp_dir(), 'out_sf_proc'),here should produce temporary files with prefix 'out_sf_proc'. Well, it does not. At least not on my server. The files I find that get created by WindowsPipes class are prefixed with: 'out' and 'err' such as 'err4F18.tmp' and 'out4F19.tmp'.
I put in some 'echo's for a quick check to see what gets called and what not.
The __destruct method gets correctly called, and hence, the removeFiles method as well.
However, the @unlink($filename);here does not always succeed resulting in the leftover files.
I have also put in a stupid loop to attempt to remove the file once every second until it succeeds (max 60sec) and I can see that some of the files after 5-10 attempts get correctly removed. Some others reach 60 sec and remain forever. During that time if I attempt to remove these file manually with admin account Windows says that files are in use and cannot be removed.
Any ideas?
Php: 5.6
The text was updated successfully, but these errors were encountered:
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] Fix pipes cleaning on Windows
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19089
| License | MIT
| Doc PR | -
Commits
-------
d54cd02 [Process] Fix pipes cleaning on Windows
Hi,
I have found and read these issues #8629 and #7078 and I experience the same problems still.
It is a Windows issue - I have a synchronization cli application using symfony/console and symfony/process launching around 4-5K processes a day. It was built and tested on linux and deployed on Windows 2008 Server R2 for production.
The main application is launched by Windows Task Scheduler and using an internal cron-like procedure it launches processes at certain times to sync data between servers.
It worked for a few months then it stopped and was unable to launch even manually.
Looking into the thing and debugging the main process I have found that I was getting this 'A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable.' exception. I looked up the TEMP directory and I have found around 120,000 temporary files inside (most of them 0 bytes).
Looking for the origin I was thrown off-track because I the
Process::STDOUT => tempnam(sys_get_temp_dir(), 'out_sf_proc'),
here should produce temporary files with prefix 'out_sf_proc'. Well, it does not. At least not on my server. The files I find that get created by WindowsPipes class are prefixed with: 'out' and 'err' such as 'err4F18.tmp' and 'out4F19.tmp'.I put in some 'echo's for a quick check to see what gets called and what not.
The
__destruct
method gets correctly called, and hence, theremoveFiles
method as well.However, the
@unlink($filename);
here does not always succeed resulting in the leftover files.I have also put in a stupid loop to attempt to remove the file once every second until it succeeds (max 60sec) and I can see that some of the files after 5-10 attempts get correctly removed. Some others reach 60 sec and remain forever. During that time if I attempt to remove these file manually with admin account Windows says that files are in use and cannot be removed.
Any ideas?
Php: 5.6
The text was updated successfully, but these errors were encountered: