LinkStack icon indicating copy to clipboard operation
LinkStack copied to clipboard

Slow page load in admin panel

Open noctarius opened this issue 1 year ago • 14 comments

LinkStack version

4.8.3

Description

Any page load in the admin panel takes about 3 seconds and I can see the lsphp process shooting up to around a 100% during that time. The page loads fine, though (no error), and the normal like page is super quick.

Is there anything specific happening in the admin panel that could cause this?

Details about your system

Hostinger hosted website with PHP 8.3 via Litespeed. Installed with MySQL as the database.

How to reproduce

Didn't really do anything special. Installed, ran the installation. Sorry, bad information, I know.

Possible Solution

No response

Additional Context

No response

noctarius avatar Nov 29 '24 09:11 noctarius

I have never seen it take that long. I know there is a little delay between the page loading.

Is this intermittent or all of the time?

tvx-matt avatar Dec 01 '24 02:12 tvx-matt

Same here.

I installed it in from the packaged version of Yunohost and the admin panel is very slow.

I thought it was a due of the Yunohost packaging.

But after cloning the project in my host (Ubuntu 24-04/ php 8.3) and running it from scratch (sqlite db) I got the same bad performances.

raphaeljolivet avatar Dec 08 '24 10:12 raphaeljolivet

Please check if page load is faster for non-admin users.

If a user is an admin, the panel will make a couple HTTP requests before loading the page. I believe these requests have a timeout limit of 3 seconds.

  • Two requests are made to internal URLs and two to external URLs.
  • All requests should abort before the 3-second limit in case authentication is required.

The requests are currently handled on the backend, synchronous with the page load. These requests will be made asynchronously in version 5.0.

All external requests can be disabled in the config:

thorium_tbo7rS6xtQ

JulianPrieber avatar Dec 09 '24 14:12 JulianPrieber

Since this is a laravel application, I used php artisan and changed some cache drivers to database rather than file. It seemed to help a little bit. (Since I don't have redis available)

On .env:

CACHE_DRIVER=database
SESSION_DRIVER=database

Then run

php artisan cache:table
php artisan session:table
php artisan migrate

You can explore other drivers available at laravel's doc.

The project uses laravel 9.x (outdated) which you can check by

php artisan about

rulrok avatar Dec 13 '24 04:12 rulrok

I was able to reproduce a similar page load time under specific conditions.

To address this, I implemented a fix targeting several systems that were contributing to slowdowns in certain scenarios.

For users experiencing these slow loading speeds, this update should improve page load times by up to 83%.

The fix is now available for testing in version 4.8.5-beta-2.

JulianPrieber avatar Dec 13 '24 21:12 JulianPrieber

after update to this beta (speed problem), I get: ErrorException Undefined variable $links

https://flareapp.io/share/x5M1r3X5

przemyslnik avatar Dec 15 '24 03:12 przemyslnik

@przemyslnik I have updated,

I cannot replicate this issue.

What page were you trying to access when this error occurred?

tvx-matt avatar Dec 15 '24 17:12 tvx-matt

@MattDevTec Dashboard, will try manual update. Aside from the error, I didn't feel the acceleration, so maybe more things went wrong :D

przemyslnik avatar Dec 15 '24 20:12 przemyslnik

@przemyslnik I have personally never used Manual Upgrade.

Please could you try an automatic update? I have not had this issue myself and its much faster for me.

I think I have had this error before and it was something in database

tvx-matt avatar Dec 15 '24 23:12 tvx-matt

Correction to this, please run

your.domain/update?finishing

This has just corrected the same issue for someone else

tvx-matt avatar Dec 16 '24 00:12 tvx-matt

@MattDevTec deleted everything without database file and upload once again. It works much faster despite the fact that it is an older version without a patch. I dont update once more to beta, because now is ok. Thanks for help and I will save this link to resume update for next time :D

przemyslnik avatar Dec 18 '24 11:12 przemyslnik

Thats OK,

however manual updates cause this issue, the easiest, quickest and safest way is to preform automatic update. :)

tvx-matt avatar Dec 18 '24 21:12 tvx-matt

@MattDevTec I get this issue after automatic update O:) Next try, and once more dont fix it :)

przemyslnik avatar Dec 19 '24 01:12 przemyslnik

Hmm. I'm not too sure then

tvx-matt avatar Dec 20 '24 09:12 tvx-matt