Avoid Rack::Lock
Add explicit long database query