Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7196767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:50:27+00:00 2026-05-28T20:50:27+00:00

I am using simple urlconnection like this: url = URL+getClient&uid=+cl_id; URL url = new

  • 0

I am using simple urlconnection like this:

       url = URL+"getClient&uid="+cl_id;
        URL url = new URL(this.url);
        Log.d("Set++","get_t URL: "+ url);
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();

its working fine, but sometimes i get this error:

       error: java.net.SocketTimeoutException: Connection timed out

what could be the reason? I have only 4 clients… so i dont think that the server is overloaded with connections.

the code:

    try {
        URL = Settings.BASE_URL + "_interface.php?" +
                "key=" + Settings.KEY +"&app_naam="+Settings.APP_NAAM+ "&action=check&setTime="+c;
        URL url = new URL(URL);
        if(D)Log.e("ChekTreadAanvr+url", URL);
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();

        BufferedReader rd = new BufferedReader(
                new InputStreamReader(conn.getInputStream()));
        String response;
        if ((response = rd.readLine()) != null) {
            rd.close();
        }
        if(D) Log.d("WebSaveThread+","DATARESIEVED:  "+response);
        return response;
            } catch (MalformedURLException e) {
        if(D)Log.d("ERR","server chekc failure ++ ");
        return success = false;
    } catch (IOException ioex) {
        if(D)Log.e("ERR", "error: " + ioex.getMessage(), ioex);
        success = false;
    }
    return Boolean.toString(success);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:50:28+00:00Added an answer on May 28, 2026 at 8:50 pm

    It may be possible that your Internet Connection Speed is weak. You can increase your Timeout Interval by using following method.

    httpURLConnection.setConnectTimeout( 6 * 10 * 1000 ); // One Minute
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using simple_form , I have a simple input like this: <%= f.input :email %>
Using simple type like class A { public int X, Y; } with object
i would like to implement a thread framework using simple c and timers....can anyone
I'm using the Java URL and URLConnection classes to upload an file to a
I using simple re-size method to change my bitmap to new size. The original
I'm using Simple 2.4.1 library in my Android project. I got this OutOfMemory error
when using simple example like at https://developers.facebook.com/docs/reference/dialogs/oauth/ after auth box prompting for additional permissions
Am using simple webservice .asmx.In my web service returning some data like: <?xml version=1.0
I am using simple html dom for parsing an external url and getting images
i'm using simple jQuery Tools Tabs $(ul.tabs).tabs(div.panes > div); with this html: <!-- the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.