Heroku Server Timeout For Shopify App
I have a Shopify App on a Heroku Server. One of the calls I make to that app is a POST where I send a Collection, an Array of Products and an Array of Customers. From there I make multiple API Calls to the Shopify Admin to create all those things. This is currently working great if there is just a few products and customers to create. Heroku, however, has a 30-second timeout limit. This cannot be changed. The only way around it is to send a "Heartbeat" and then you get an additional 55 seconds. I have not figured out how to send a "Heartbeat" back and continue on. I tried Returning a Status 100 but that didn't work. Other than splitting this into multiple calls. Is there a better way to do it?
You're architecting your App poorly. If you make a POST to your App, organize the incoming data, send it to a background job to get processed, and then return a 200 OK back to your App if you used XHR, or splash up a page in your App saying "Thanks, we're working on things"...
That way you keep your merchant client informed, things work fine, and you have no chance of blowing out on a 30 second timeout.
- → Trigger a click with jQuery using link_to of rails 4
- → Adding html data attribute to simple_forms input
- → How to remove parameters from the root URL if it does I18n
- → passing parameters to rails back end from an ajax call
- → Blocking ?page= in robots.txt
- → react js and rails Updating state on a component with active record relationship
- → State not passed into prop
- → Cannot read property 'modalIsOpen' of undefined
- → Objects not valid issue
- → How to map API params to model
- → Consuming webhooks shopify-api
- → How to add ScriptTag on shopify_api gem?