metasmoke icon indicating copy to clipboard operation
metasmoke copied to clipboard

Set maximum processing time limits for Metasmoke queries

Open teward opened this issue 5 years ago • 4 comments

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)

teward avatar Jan 24 '20 23:01 teward

I'm... not even sure if this is possible. @Undo1, happen to know if you can terminate a Rails request manually?

ArtOfCode- avatar Jan 25 '20 16:01 ArtOfCode-

If it is possible, it’ll be a Passenger config option. I bet it’s in there somewhere.

Undo1 avatar Jan 25 '20 17:01 Undo1

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.

thesecretmaster avatar Jul 06 '20 12:07 thesecretmaster

This would also be resolved by switching activejob backends cc #795

thesecretmaster avatar Aug 31 '20 12:08 thesecretmaster