Jump to content

cURL timeout - backoffice very very slow


Recommended Posts

PREFACE

Hello everyone,

I've been searching for a solution to this for several days now, without any success, and I hope getting some insight from you might help me overcome this obstacle. So thanks in advance.

 

THE PROBLEM

Backoffice is extremely slow. Some pages can sometimes take up to a minute or more to load. My frontpage for customers works fast.

I have found through the debug mode that the in the orders page I'm getting a cURL timeout. Attached printscreen.

 

PRE-DIAGNOSE

After some testing, I identified 2 problems:

1) In IPv4, using URLs is very slow but using IPs works extremely fast.

2) In IPv6 both using URLs and IP's is extremely slow.

 

ENVIRONMENT

Prestashop 1.7.6.1

Ubuntu Linux server

   I attached /etc/gai/conf

 

A FEW TESTS

Ping IPv4:

ping dns.google.com

   Hangs for 10s before it starts. My personal laptop (another machine) runs full command in 0.4s

ping 8.8.8.8

   This is the IP of Google DNS (dns.google.com, the same as above) works perfect and starts immediately, running in 0.003s

 

Ping IPv6:

ping6 to 2001:4860:4860::8888

   This is the IPv6 of Google DNS. It hangs for 10s before it starts

ping6 ipv6.google.com

   (Google IPv6 DNS) hangs for 20s before it starts

 

Nslookup:

nslookup -query=AAAA www.google.com

   Runs in about 1s

 

Dig:

dig dns.google.com

   Runs in about 1s

 

Wget:

wget --output-document=/dev/null  https://test2.fibertelecom.it/5MB.zip

Takes 5s

wget --output-document=/dev/null  185.157.229.246/5MB.zip

Same file and server as above but direct IP, takes 0.07s
 

APPRECIATION

I cannot understand how to move forward from here. This is where your input is greatly valued.

Once again thank you very much to anyone who decided to take time read this or contribute.

Health and success to all

etc-gai-conf.png

curl failed backoffice - orders page.png

Link to comment
Share on other sites

TEMPORARY FIX

For anyone in my shoes I can say I found a "half fix" that consists in disabling IPv6.

This to me is not ideal, as the world moves more and more to include it, but in a pinch will have to suffice while I find a way to correct the problems with IPv6.

I will still appreciate any help from someone in this matter.

 

For people in the same situation, here is how to disable IPv6:

- Open the file with your favourite text editor:

/etc/sysctl.conf

- Append the following code at the end:

# Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

- To apply changes, run in the console:

sudo sysctl -p

 

Thanks again in advance for any contributions

Edited by ps_what (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...