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 73967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:17:04+00:00 2026-05-10T20:17:04+00:00

I have a new VPS server, and I’m trying to get it to connect

  • 0

I have a new VPS server, and I’m trying to get it to connect to another server at the same ISP. When I connect via mysql’s command line tool, the connection is very fast.

When I use PHP to connect to the remote DB, the connection time may take up to 5 seconds. Queries after this are executed quickly.

This is not limited to mysql, using file_get_contents() to download a file from nearly any other server gives the same lag. Using wget to get the file does not have this lag.

I timed DNS queries from within PHP using dns_get_record(), and these are fast (1-2 milliseconds).

Any thoughts on what in the php config may be causing this?

Thanks.

  • 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. 2026-05-10T20:17:05+00:00Added an answer on May 10, 2026 at 8:17 pm

    I ended up upgrading from PHP 5.1.6 to PHP 5.2.6, and the problem went away. It definitely was a DNS lookup issue within PHP, the following would take about 5 seconds to run:

    gethostbyname('example.com') 

    I have a feeling IPV6 was an issue (mostly a hunch from reading about this online), but I don’t have any proof.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am brand new to Python, and have been trying to get the Django
I've hired a new VPS and have root access. Now i want to configure
I have a VPS running a VPS optimized Debian distro. I am very new
I have Apache 2 running on a VPS server (running Debian). I recently changed
I'm trying to make a push notification work on my debian vps (apace2, mysql).
I'm new to server administration but I was able to get a LAMP setup
I'm trying to build a very simple VPS control panel; i have the following
I'm new to all the Cloud computing and VM thing. I have a VPS
i have new webcam. The software of the webcam can give out the webcam
I have new problem. My code: .method public static void Main() cil managed {

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.