Actions
Task #883
closedhave import scripts regularly check disk space and pause processes if getting close to limit
Start date:
04/01/2014
Due date:
% Done:
0%
Estimated time:
Activity type:
Description
issue¶
- there is no soft limit on disk space inside Postgres, so the hard limit gets reached instead, causing an error which ricochets across the system and crashes various processes (similar to an out-of-memory condition caused by kernel overcommit, except that Postgres already has a throttle for that problem)
- since Postgres does not have a disk space throttle1, our scripts need to do this instead
1 the temp_file_limit
config param seems to be intended to do this, but throws an error instead of handling the problem by pausing (self-throttling)
.
implementation¶
lib/sql.py
run_query()
(the global function, not the method ofDbConn
) should trap"OperationalError: could not extend file "...": No space left on device"
and handle it by pausing until the disk space goes back down, and then retrying the last SQL command- the last SQL command does not need to be idempotent, because the error means that it was rolled back
Actions