Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow page load in admin panel #853

Open
noctarius opened this issue Nov 29, 2024 · 14 comments
Open

Slow page load in admin panel #853

noctarius opened this issue Nov 29, 2024 · 14 comments
Labels

Comments

@noctarius
Copy link

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

@tvx-matt
Copy link
Contributor

tvx-matt commented Dec 1, 2024

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?

@raphaeljolivet
Copy link

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.

@JulianPrieber
Copy link
Member

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

@rulrok
Copy link

rulrok commented Dec 13, 2024

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

@JulianPrieber
Copy link
Member

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.

@przemyslnik
Copy link

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

https://flareapp.io/share/x5M1r3X5

@tvx-matt
Copy link
Contributor

@przemyslnik I have updated,

I cannot replicate this issue.

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

@przemyslnik
Copy link

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

@tvx-matt
Copy link
Contributor

tvx-matt commented Dec 15, 2024

@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
Copy link
Contributor

Correction to this, please run

your.domain/update?finishing

This has just corrected the same issue for someone else

@przemyslnik
Copy link

@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

@tvx-matt
Copy link
Contributor

Thats OK,

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

@przemyslnik
Copy link

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

@tvx-matt
Copy link
Contributor

Hmm. I'm not too sure then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants