gjcarneiro / yacron

A modern Cron replacement that is Docker-friendly
MIT License
449 stars 38 forks source link

Shell Reporter Argument Length #62

Closed hhergeth closed 2 years ago

hhergeth commented 2 years ago

I ran into a problem when the stderr or stdout strings became very large because the OS has limits on their length and the shell then throws the following error: ERROR:yacron:Problem reporting job backup failure: [Errno 7] Argument list too long: '/bin/sh' Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/yacron/job.py", line 251, in report

The easy solution is of course to have a hard cap on the length of these strings, over which they don't get passed. The question then becomes what this limit is. I found some information regarding Linux here. But since this is OS specific and potentially configurable I decided to go with a safe lower limit instead of trying to determine the correct limit at rune time.

hhergeth commented 2 years ago

I implemented the changes we discussed. Let me know if you would like to see anything else changed.

gjcarneiro commented 2 years ago

Hm, checks are failing now. Are you able to fix?

hhergeth commented 2 years ago

Looks like rebasing was not enough to resolve the issue, not sure what else I could do.

gjcarneiro commented 2 years ago

ok, fine, I'll fix it myself then, hopefully it's a 5 minute job