[SOLVED][NOT A YNH ISSUE] App takes 42sec to load

My YunoHost server

Hardware: Dedicated Server on Online.net
YunoHost version:
I have access to my server : Access to everything
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:

Description of my issue

I had install PRESTASHOP with yunohost apps. And I don’t know HOW, but this apps takes 42s to load ! Here is an example page : Rotor pour pompe Pond Eco Plus E 20.000

I had check with prestashop support, and after 1 week, the reason isn’t prestashop itself, but it seems to be Yunohost. Maybe a redirect error or something ? I don’t know what to check in order to see that.

This page and its neighbors loads under 2 seconds with me. The longest element to load is the index.php page, with 800ms.

Please open the page with the developer tools enabled. You can profile what takes too long to load in the Network tab.

1 Like

Here is a screenshot of 42seconds of loading. I don’t know how and what cause this malfunction.

Thanks for checking this

I confirm I cannot replicate the issue. On which clients/computer do you have the problem? Are they connected to the server with a VPN?

Can you have a look to PHP8.1-FPM service logs and share them right after loading the page? We might have some information on what’s happening.

I’d try on both computer from 2 differents network. One in my own house, another one via my friend. No VPN or network-hacks.

On Mobile, it works great.

Seems to be really slow on chromium based browser. 2sec with Firefox. 41.28s with Edge or Chrome.

Here is the logs from Yunohost admin page : hastebin

After some test, it seems that on both we browser, the page responds under 41.28sec exactly… Any nginx tweaks or bugs about that ?

Here is the nginx error log : hastebin

it’s fine for me using firefox and vivaldi

It took about 2 seconds on mobile.
You can check these tools :


All of them show that it’s not bad.
Check your PC, try a vpn, check your network. The website is fine

I don’t know why.

At my office, my home, and my friend’s home, the website takes 41.28sec EXACTLY to load. With ou without a VPN.

But on mobile and yours tools, it works great.

I just tested at home, with Firefox and Chromium, on Linux, and I can see no problem loading your page.

When you do your tests on other networks, is it with your computer or with other people’s computer ?
If it is always exactly the same time, this is more than strange, and it may me think the problem is in the user’s computer, not serverside.
If it was serverside, the time would not be exactly the same.

Damn. I don’t understand.

3 computers :

  • Linux Arch / Firefox / At home / No VPN
  • Windows 10 / Edge / Friend’s home / No VPN
  • Windows 11 / Firefox / At the office / No VPN

We also have ask PrestaShop community to check that, to know if it’s a PRESTA or YUNOHOST issue. Our PrestAshop guy told us that the website was INCREDIBLY SLOW, and this is not a PrestaShop issue.

So, we are 3 to have this problem, and I don’t understand why you haven’t. That’s insane.

Did you try to put something into the basket ? (Try to add)

Once something is in my cart, I can reproduce the problem, 42.87s to load a page.
(Not always the same time, 2nd page is 41.31s)

So, yes, you have a problem.

And debugging it will not be fun :scream:

(I have absolutely 0 knowledge about prestashop)

You should try to see in it’s doc if it is possible to debug to have a timeline of what takes time to process, maybe it is stuck somewhere reading a cookie, or requesting a database, or reading a file, or anything :person_shrugging:

Oh yes ! Indeed, I can reproduce that with or without an item in the cart.

Seems to be the issue. I will try with debug mode !

If anyone can test it, WITH an item, and told me if it’s the same problem ?

I tried in a new browser, the wait starts once something have been added in the cart.

The cookie do not changes, so I think my browser do not know why it is so long.
The strange thing is that the long part is waiting for the server to aknowledge the request, then the content download is pretty fast.

OH !

I have found this in my logs :

<br />
<b>Warning</b>:  ftp_nlist(): Connection timed out in <b>/var/www/prestashop/modules/nkmgls/nkmgls.php</b> on line <b>2307</b><br />
<br />
<b>Warning</b>:  ftp_pasv(): Connection timed out in <b>/var/www/prestashop/modules/nkmgls/nkmgls.php</b> on line <b>2309</b><br />
<br />
<b>Warning</b>:  ftp_nlist(): Connection timed out in <b>/var/www/prestashop/modules/nkmgls/nkmgls.php</b> on line <b>2310</b><br />
<br />
<b>Warning</b>:  ftp_close(): Connection timed out in <b>/var/www/prestashop/modules/nkmgls/nkmgls.php</b> on line <b>2335</b><br />
<br />
<b>Warning</b>:  ftp_nlist(): Connection timed out in <b>/var/www/prestashop/modules/nkmgls/nkmgls.php</b> on line <b>2307</b><br />
<br />
<b>Warning</b>:  ftp_pasv(): Connection timed out in <b>/var/www/prestashop/modules/nkmgls/nkmgls.php</b> on line <b>2309</b><br />
<br />
<b>Warning</b>:  ftp_nlist(): Connection timed out in <b>/var/www/prestashop/modules/nkmgls/nkmgls.php</b> on line <b>2310</b><br />
<br />
<b>Warning</b>:  ftp_close(): Connection timed out in <b>/var/www/prestashop/modules/nkmgls/nkmgls.php</b> on line <b>2335</b><br />
<br />
<b>Warning</b>:  unlink(/var/www/prestashop/modules/nkmgls/import/tbzipdeltimes_20240320.csv): No such file or directory in <b>/var/www/prestashop/modules/nkmgls/nkmgls.php</b> on line <b>2337</b><br />
{"dropdown":"\n<!-- begin module:leofeature\/views\/templates\/front\/drop_down.tpl -->\n<!-- begin \/var\/www\/prestashop\/modules\/leofeature\/views\/templates\/front\/drop_down.tpl -->\t\t\t<div class=\"leo-dropdown-cart-content clearfix\">\n\t\t\t<div class=\"leo-dropdown-list-item-warpper\">\n\t\t\t\t<ul class=\"leo-dropdown-list-item\"><li style=\"width: 265px; height: 115px\" class=\"leo-dropdown-cart-item clearfix first last\">\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"leo-cart-item-img\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"label\" href=\"https:\/\/afloredeau.com\/shop\/index.php?id_product=3008&amp;rewrite=chasseur-de-herons-chats-sans-risques&amp;controller=product\" title=\"BIRD&amp;CAT PROTECTOR\"><img class=\"img-fluid\" src=\"https:\/\/afloredeau.com\/shop\/img\/p\/4\/2\/7\/5\/4275-small_default.jpg\" alt=\"BIRD&amp;CAT PROTECTOR\" title=\"BIRD&amp;CAT PROTECTOR\"\/><\/a>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<\/div>\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"leo-cart-item-info\">\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"product-name\"><a class=\"label\" href=\"https:\/\/afloredeau.com\/shop\/index.php?id_product=3008&amp;rewrite=chasseur-de-herons-chats-sans-risques&amp;controller=product\" title=\"BIRD&amp;CAT PROTECTOR\">BIRD&amp;CAT PROTECTOR<\/a><\/div>\n\t\t\t\t\t\t\t\t<div class=\"product-price\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  <div class=\"current-price\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"price\">39,99\u00a0\u20ac<\/span>\n\t\t\t\t\t\t\t\t\t  <\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"product-quantity\"><span class=\"lablel\">Quantit\u00e9<\/span>: 1<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<a class=\"leo-remove-from-cart\"\t\t\t\t\t\n\t\t\t\t\t\t\t\thref=\"javascript:void(0)\"\t\t\t\t\t\n\t\t\t\t\t\t\t\ttitle=\"Retirer du panier\" \n\t\t\t\t\t\t\t\tdata-link-url=\"https:\/\/afloredeau.com\/shop\/index.php?controller=cart&amp;delete=1&amp;id_product=3008&amp;id_product_attribute=0&amp;token=b86860ce6a1599d9fa65bb3a28b8ac39\"\n\t\t\t\t\t\t\t\tdata-id-product = \"3008\"\n\t\t\t\t\t\t\t\tdata-id-product-attribute = \"0\"\n\t\t\t\t\t\t\t\tdata-id-customization = \"\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<i class=\"material-icons\">&#xE872;<\/i>\n\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"leo-dropdown-overlay\">\n\t\t\t\t\t\t\t\t<div class=\"leo-dropdown-cssload-speeding-wheel\"><\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"leo-dropdown-additional\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/li><\/ul>\n\t\t\t<\/div>\n\t\t\t<div class=\"leo-dropdown-bottom\">\n\t\t\t\t\t\t\t<div class=\"leo-dropdown-total\" data-cart-total=\"1\">\n\t\t\t\t\t<div class=\"leo-dropdown-cart-subtotals\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"products clearfix\">\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 col-sm-6 col-md-6 col-lg-6 col-xl-6\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"label\">Sous-total<\/span>\n\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 col-sm-6 col-md-6 col-lg-6 col-xl-6\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"value\">39,99\u00a0\u20ac<\/span>\n\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"shipping clearfix\">\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 col-sm-6 col-md-6 col-lg-6 col-xl-6\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"label\">Livraison<\/span>\n\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 col-sm-6 col-md-6 col-lg-6 col-xl-6\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"value\">gratuit<\/span>\n\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"tax clearfix\">\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 col-sm-6 col-md-6 col-lg-6 col-xl-6\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"label\">Taxes incluses<\/span>\n\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 col-sm-6 col-md-6 col-lg-6 col-xl-6\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"value\">6,66\u00a0\u20ac<\/span>\n\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"leo-dropdown-cart-total clearfix\">\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-xs-6 col-sm-6 col-md-6 col-lg-6 col-xl-6\">\n\t\t\t\t\t\t\t\t<span class=\"label\">Total<\/span>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"col-xs-6 col-sm-6 col-md-6 col-lg-6 col-xl-6\">\n\t\t\t\t\t\t\t\t<span class=\"value\">39,99\u00a0\u20ac<\/span>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<!-- add Spent X to get free ship in checkout page Leotheme -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- end -->\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"leo-cart-dropdown-action clearfix\">\n\t\t\t\t\t<a class=\"cart-dropdow-button cart-dropdow-viewcart btn btn-primary btn-outline\" href=\"\/\/afloredeau.com\/shop\/index.php?controller=cart&amp;action=show\">Voir le panier<\/a>\n\t\t\t\t\t<a class=\"cart-dropdow-button cart-dropdow-checkout btn btn-primary btn-outline\" href=\"https:\/\/afloredeau.com\/shop\/index.php?controller=order\">Check-out<\/a>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\t<!-- end \/var\/www\/prestashop\/modules\/leofeature\/views\/templates\/front\/drop_down.tpl -->\n<!-- end module:leofeature\/views\/templates\/front\/drop_down.tpl -->\n","modal":"","notification":""}

It’s in my javascript log, but it is talking about things missing on your server, and according to the method names, there is a ftp involved, could it be the cause of the delay ?

edit : the last line is REALLY long, and really different of the rest, do not ignore it.

Oh !

The module named nkmgls seems to be the issue. I had removed it, and it seems to be working. Can you confirm me this on your side ?

If it’s OK, you have damn saved my life !

Cart full, no delay nowhere.

Modules are fun®

Thanks to all of you. I’ll solved this.

And sorry about the bug which is not from Yunohost. :joy: