5

I am using opswork with t2.medium machine with ruby clockwork running in it.

every 30 seconds we are triggering a job.

SPAWNED BG JOB FOR TASK: 20 for SC: 20 with Sidekiq id: 3afda705eaf597edb4bcc257
log rotation inter-process lock failed. No such file or directory @ rb_sysopen - log/sql.log
log rotation inter-process lock failed. No such file or directory @ rb_sysopen - log/sql.log
log rotation inter-process lock failed. No such file or directory @ rb_sysopen - log/sql.log
log rotation inter-process lock failed. No such file or directory @ rb_sysopen - log/sql.log
log rotation inter-process lock failed. No such file or directory @ rb_sysopen - log/sql.log
log rotation inter-process lock failed. No such file or directory @ rb_sysopen - log/sql.log
log rotation inter-process lock failed. No such file or directory @ rb_sysopen - log/sql.log
log rotation inter-process lock failed. No such file or directory @ rb_sysopen - log/sql.log
SPAWNED BG JOB FOR TASK: 25 for SC: 25 with Sidekiq id: f9142190bd44736815c10645

in clockwork logs i am seeing below error and clockwork functionally getting stopped. when i restart clockwork it is started working. i don't have any idea.

log rotation inter-process lock failed. No such file or directory @ rb_sysopen - log/sql.log

help please

Updated : few more information we are using ruby Logger to log messages in sql.log. it has a default log rotation option. Link

Thanks in advance.

shakeel
  • 801
  • 1
  • 8
  • 24
  • 1
    If you were using regular logrotate then you need to use the copytruncate option ( https://gorails.com/guides/rotating-rails-production-logs-with-logrotate ). I'm guessing that the same principle applies here: copy the current log file, then empty the open, live one, so that the one Rails is attached to doesn't disappear. – Phil Jan 18 '18 at 13:59

0 Answers0