metasmoke
metasmoke copied to clipboard
Set maximum processing time limits for Metasmoke queries
Currently if a query is submitted to Metasmoke that requires a long time to return, Metasmoke will continue to handle the request even if the requestor has timed out (to my knowledge). This can mean searches will return 504 Gateway Timeout errors even though the request is still being processed.
It would be prudent to set a maximum processing time limit for a request (which would correspond to HAProxy's setup currently which is a maximum of 60 minutes wait-time for a response from Metasmoke for a request) and then if that value is exceeded issue a 408 Request Timeout
or similar error code from within Metasmoke and then ending the processing of the request when that time is elapsed.
This is currently most seen in Search, but probably could be implemented elsewhere. (Arose from #705 as a separate feature discussion idea)
I'm... not even sure if this is possible. @Undo1, happen to know if you can terminate a Rails request manually?
If it is possible, it’ll be a Passenger config option. I bet it’s in there somewhere.
Could also use this gem: https://github.com/sharpstone/rack-timeout. If we wanted to, I'd be happy to test it and set it up.
This would also be resolved by switching activejob backends cc #795