-
Notifications
You must be signed in to change notification settings - Fork 31
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
Empty Log Files Are Created On Each Request #186
Comments
I'll add a way to disable logging into the driver |
@notkriswagner did you guys have a chance to look at the issue? Just wondering if it's time to update the lib in our image. |
Not yet, I will update here when the issue is fixed |
Hi @notkriswagner , My company has been using the pdo_snowflake driver since mid january this year for one project. The problem with the bug reported here is that it is not only the project making active use of the driver which ends up being cluttered with empty log files but also all the other projects sharing the same Apache instance. This is quite problematic as right now there are around 37 projects running on this specific staging environnement and the empty logs grow quite fast in number. It seems that the empty logs are generated whenever the stderr stream is opened. Have you been able to make advancements on the possibility to disable the logger ? Regards. |
Hi @DevRebs. Just FYI. We have been running SF PHP driver in prod for some time already. The problem with logs still seems to be an issue couple updates since I reported the issue. So for the time being we just use a simple cron job which removes empty files every 5 mins or so. |
@sfc-gh-kwagner we are also hitting this problem, we recently switched from the ODBC driver once this was out of preview, but the logs are creating tons of files on our system too so we have to also do the cron removal of the files right now. In a high traffic site the amount of files it creates is pretty high, creating an inode resource restraint too. |
Hi @daum this issue was just fixed in our libsnowflakeclient driver and will make it upstream into this driver in the next release |
Hello @sfc-gh-kwagner , Can you provide an estimated date for the next release ? Thank you in advance. |
hi - there's been a couple releases since this issue was raised, so closing this issue for now. If it's still a problem, do comment please and I'll reopen and we can look. |
Discovered similar behavior today and eventually traced it to the I eventually found that disabling the driver was enough to prevent the behavior. I now have
My question is, why does the driver insist on touching a 'logs' dir at what seems to be module initialization by the PHP executable? Wouldn't it be less intrusive to only do such a touch when the driver actually wanted to write something, and then issue the error? |
Shouldn’t this log be disabled by default? |
thank you for your comments and feedback - reopening this to investigate |
confirmed this is a bug (empty |
Addressed in:
since the fix involves the underlying libsfclient too; a libsfclient bump will be needed after the fix is in the underlying library |
Both PRs are merged. Next steps:
I'll keep this thread posted |
fixed release is expected to be available towards mid June 2024 |
fix released with v3.0.0 |
Once Snowflake driver is registered with PHP than every time a Laravel app serves a request or runs a unit test a empty log file file is created.
Initially that behaviour was noticed with both
pdo_snowflake.logdir
andpdo_snowflake.loglevel=DEBUG
commented out.Uncommenting the lines and trying to assign different values (e.g. dir locations and log levels) did not help.
Besides the need to clean up empty log files we are also concerned about performance impact (an unnecessary disk I/O is done for each request).
Is there a way to completely disable logging or is it planned? Thank you
The text was updated successfully, but these errors were encountered: