A database connection is cancelled when it takes more than 60 seconds before the first record is sent or if a pause of 60 seconds between two record.
While testing bulk instance id download, noticed that mysterious 500 closed error. It turns out that the default 60s connectionReleaseDelay parameter kicked in. While the parameter can be adjusted when starting mod-inventory-storage module, it would be nice if the connection used by streaming operation is not treated as idle.
Steps to Reproduce:
This problem was observed in bugfest-golden env, but you can easily reproduce it by doing
- Use a larger dataset. For example, nightly perf data set.
- Start mod-inventory-storage with a smaller connectionReleaseDelay value like 10s
- Make API call to /instance-bulk/ids?limit=2147483647&query=(keyword="") sortby title
API call finishes OK
Database has log entry about broken pipe
RMB incorrectly implements connectionReleaseDelay by cancelling connections that are in use.
Disable the current wrong implementation of connectionReleaseDelay.
Consequently connections that are no longer in use will stay in the connection pool forever (but can be re-used).
RMB-663 for the correct implementation.
This bug does not affect the long running database tasks when upgrading a module to a new version.