Android over WiFi connection often times out

Source: Internet
Author: User

============ Problem Description ============


Recently made an Android application, testing found that if through the WiFi connection often time out, but with 3G network connection sometimes very slow, but rarely time out, the connection with the HttpClient post method, the server is TOMCAT7, database Oracle, connection C3P0 connection pool, Does anyone know what it is?
The server connection time-out has been adjusted, or has little effect.

============ Solution 1============


Timeout you want to judge when the server receives the time of the post, is the server receive a problem or send a problem

============ Solution 2============


WiFi LAN, is not the problem of network settings?

============ Solution 3============


WiFi LAN, is not the problem of network settings?

============ Solution 4============


When the httpclient is connected, there are about three timeouts. The first connection pool to fetch a connection, the second is the client to the server connection time, the third is the service side response time. If you use 3G no problem, I feel about the WiFi network client to the server connection timeout, can be connected to catch a bit of an exception, to see if it is connecttimeout-exception ... or set Httpconnectionparams.setconnectiontimeout to a long time:
The above can try ...

Android over WiFi connection often times out

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.