Closed derotune closed 8 years ago
I had the same issue. It seems to be saving the crono log into one cell in the crono table. This will quickly reach the cell limit and causes crono to stop. Although I really like crono, I had to switch to something else that was a bit more reliable and have not had any issues since.
@ceospfx In my situation crono writes into ENV.log in the rails app. What do you use now?
For rails crono creates a table in your database to keep track of when it ran. It's generally one row in the table that keeps getting updated. In that table one of the cells is keeping track of the log records - this is what grows each time crono runs and it will eventually reach the cell limit and die.
Hope that helps, C.
On Tue, Feb 16, 2016 at 12:33 AM, BeeZerk notifications@github.com wrote:
@ceospfx https://github.com/ceospfx In my situation crono writes into ENV.log in the rails app. What do you use now?
— Reply to this email directly or view it on GitHub https://github.com/plashchynski/crono/issues/41#issuecomment-184573656.
Insomniac Digital, Inc. Direct: 310-502-6666
Hello @ceospfx do you use MySQL? Because Postgres has an unlimited text
field. Anyway, it's a good case. As temporary solutions, you can change your crono_jobs text field type from TEXT to LONGTEXT:
ALTER TABLE crono_jobs MODIFY log LONGTEXT;
Hello @LordPrettyFlacko could you send me the command line you use to start crono and your cronotab. Thank you.
I have the same issue with MariaDB. Keeping pumping unlimited text into a SQL database is not the smartest thing. Anyway I'm not interested in ALL the logs. The last 7 days would be more than enough. Would be cool if it would be configurable.
Is there a quick way to turn off all the logs?
@plashchynski I thought again about this problem and indeed it would be cool if we could configure the number of logs. I'm only interested in the last 50 log messages. Everything what is older is not important for my use case. Would be awesome if we could configure that number :-)
@reiz fair enough
Hi @plashchynski. How much time would it take for you to fix this issue? What is your estimate?
I'm working on VersionEye, which is fully open source as well. And I know how annoying it is when everybody is complaining but nobody is willing to pay Money or at least contributing. For me it would be worth $50 if you fix this ticket. Feel free to invoice me (reiz [at] versioneye.com) if you close this ticket :-)
Now you can specify:
# truncate the log to 1000 lines max
Crono.perform(TestJob).with_options(truncate_log: 1000).every 1.week, on: :monday
Also, there is increased text size limit in the migration for MySQL users
@plashchynski Awesome 👍 I will try it today. Just transferred you the $50.
@plashchynski Will you push a new release to RubyGems today?
@reiz Thanks. There's a new version 1.1.1 with these changes.
@plashchynski Great! I just deployed it to production with the new config and it seems to work like expected. Many thanks for the fast turnaround!
@reiz You're welcome :)
Hey, crono runs fine but it also posts unlimited log entries till the system space is full. What is this?