-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Running in parallel causes procedure corruption #101
Comments
Yeah, Do you have a simple way to replicate the issue so that I can test it? |
Sorry no, happens rarely ... but has happen 2 times in the past 2 or 3 weeks, it's very hard to reproduce, but I ended looking at the generated script since we run 2 process in parallel with Gearman. Running |
…icts when running processes in parallel. Have replaced for random string generation seeded by mt_rand - #101
I have replaced |
Looks like to work, thanks a lot |
@jonnnnyw You'd rather send getmypid() as $prefix parameter to uniqid(). On top of that, there is $more_entropy parameter just in case if someone will run script using pthreads. |
We run a program in parallel (multiple instances of PHP running a script) that call php phantomjs. I think we end up in situations where the content of the generated script is corrupted because two process try to write to the same file. Here is the end of a script found in /tmp :
See how it ends,
m.exit();
is not an actual command... it looks more like the end ofphantom.exit();
appended to the file.I think the error comes from how the unique names are generated (using
uniqid
)The text was updated successfully, but these errors were encountered: