-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
write error (race condition?) #85
Comments
It's probably file locking - I take it you're encountering this on linux? |
YES - linux (RedHat): uname -a |
Perhaps you should the syslog handler or hack together a handler that blind-fires to a remote logger on another system (which would be hooked up to a full DBMS) up instead - that would allow simultaneous logging. My bet is that you're probably just hitting file locking, which isn't something that can be helped, really. ed: SocketHandler or SyslogHandler are the best options for you IMO |
Great. Thanks! |
That's quite weird, I'd think opening a stream multiple times in "append" mode would be no problem. @damianb do you know if that's a platform specific issue? |
if it was, it'd be observed much more often; it's just a linux system. could be filesystem related, but my bet is that he's not on anything exotic; probably ext2/3/4. |
I fixed the code now so that it doesn't hide the php error but exposes it to the user, so if you update to latest you should see different errors, and hopefully it gives us a better insight as to what is happening. |
No news here? |
I'll close since there is no feedback, but if it crops up again with the latest version let me know. |
I've been getting this message regularly when hitting the app w/ batch processes (nb., /path/to/log/file.log IS valid & writeable and was successfully written to by the 800 or so operations previous to this):
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/path/to/log/file.log" could not be opened; it may be invalid or not writable.' in /var/www/daseframework/lib/Monolog/Handler/StreamHandler.php:67
Stack trace:
#0 /var/www/daseframework/lib/Monolog/Handler/AbstractProcessingHandler.php(41): Monolog\Handler\StreamHandler->write(Array)
#1 /var/www/daseframework/lib/Monolog/Logger.php(191): Monolog\Handler\AbstractProcessingHandler->handle(Array)
#2 /var/www/daseframework/lib/Monolog/Logger.php(294): Monolog\Logger->addRecord(100, 'INSERT INTO ite...', Array)
#3 /var/www/daseframework/lib/Dase/DBO.php(190): Monolog\Logger->debug('INSERT INTO ite...')
#4 /var/www/daseframework/lib/Dase/DBO/Item.php(162): Dase_DBO->insert()
perhaps there is a race condition??
The text was updated successfully, but these errors were encountered: