Getting 504 Gateway Timeout from ResponseException
See original GitHub issueI’m having an issue on some devices on the same network when downloading photos from Flickr. Following your suggestion on a previous issue, here is how I’m calling Picasso:
OkHttpClient client = new OkHttpClient();
client.setProtocols(Arrays.asList(Protocol.HTTP_11));
Picasso picasso = new Picasso.Builder(c)
.downloader(new OkHttpDownloader(client))
.listener(new Listener() {
@Override
public void onImageLoadFailed(Picasso picasso, Uri uri, Exception exception) {
exception.printStackTrace();
}
})
.build();
And here is the full stack trace of the exception I’m getting:
com.squareup.picasso.Downloader$ResponseException: 504 Gateway Timeout
at com.squareup.picasso.OkHttpDownloader.load(OkHttpDownloader.java:108)
at com.squareup.picasso.NetworkBitmapHunter.decode(NetworkBitmapHunter.java:46)
at com.squareup.picasso.BitmapHunter.hunt(BitmapHunter.java:123)
at com.squareup.picasso.BitmapHunter.run(BitmapHunter.java:83)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
at com.squareup.picasso.Utils$PicassoThread.run(Utils.java:306)
I tried playing with client.setConnectTimeout and client.setReadTimeout but they don’t seem to influence the downloader at all. The crash always occur before any timeout I set. Any ideas?
Thanks.
Issue Analytics
- State:
- Created 9 years ago
- Comments:28
Top Results From Across the Web
How to Fix the 504 Gateway Timeout Error on Your Site - Kinsta
Learn how to fix the 504 Gateway Timeout error code on your WordPress site. Simple, easy to follow solutions to bring your site...
Read more >504 Gateway Timeout - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 504 Gateway Timeout server error response code indicates that the server, while acting as a gateway ...
Read more >The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors
However, a 504 Gateway Timeout error means that your server didn't receive a quick enough response from the upstream server.
Read more >Bulk insert HTTP 504 Gateway Timeout - Elasticsearch
I have been experiencing a HTTP 504 Gateway Timeout from Elasticsearch during a bulk insert. We are using Amazon Elasticsearch Service and ...
Read more >How to Fix 504 Gateway Timeout Errors - Business Insider
How to get rid of a 504 gateway timeout error on a website you're visiting · Close and re-open the web browser, or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

https://stackoverflow.com/a/50834600
Please check the answer added to #683. Hope this helps