Details
-
Bug
-
Resolution: Fixed
-
Low
-
HCS 2.2.2
-
None
-
Severity 3 - Minor
Description
Summary
Purging old exports takes a long time and eventually times out
Environment
HipChat Server 2.2.2 and older
Steps to Reproduce
- Run a purge of exports older than, say 3 days
hipchat export -u 3
- The purge errors out with a message like:
Couldn't delete 251c4087-d524-48c3-88e4-478bbac18ecb, please look at the hipchat logs for more information: ('Connection aborted.', BadStatusLine("''",))
- Purge the export by posting to the service directly:
time curl -vvv -XDELETE http://localhost:7777/export/251c4087-d524-48c3-88e4-478bbac18ecb
- Curl will run for 30 seconds and time-out:
* Hostname was NOT found in DNS cache * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 7777 (#0) > DELETE /export/251c4087-d524-48c3-88e4-478bbac18ecb HTTP/1.1 > User-Agent: curl/7.35.0 > Host: localhost:7777 > Accept: */* > * Empty reply from server * Connection #0 to host localhost left intact curl: (52) Empty reply from server real 0m30.066s user 0m0.024s sys 0m0.013s
Expected Results
Old exports should be purged and archive removed from /file_store/cumulus/posixdata/f/
Actual Results
The below exception is thrown in the hcapp.log file:
2017-02-22T14:20:32.289289+00:00 hipchat.rgoffice.net gunicorn.scissortail-web.error: [7308] WORKER TIMEOUT (pid:7378) 2017-02-22T14:20:32.289289+00:00 hipchat.rgoffice.net gunicorn.scissortail-web.error: [7378] Worker exiting (pid: 7378)
Workaround
Increase the worker timeout to 120s in /hipchat-scm/scissortail/gunicorn.conf.py:
timeout = int(os.environ.get('WEB_WORKER_TIMEOUT', 120))