LMMS / lmms.io

LMMS's official website

Home Page:https://lmms.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The LSP is making the website go down.

Umcaruje opened this issue · comments

LSP changes made the whole website go down.

The website returns a 504 Gateway Time-out. It appears to have started from this commit a37cb4d

Internally in the logs it's a lot of upstream timed out (110: Connection timed out) while connecting to upstream for the fastCGI processor. When I restart the fastCGI processor I can gain access to the website for brief moments, until someone ultimately tries to access the LSP and then the whole website goes again

As a temporary fix, I renamed lsp/index.php to lsp/noindex.php directly on the server, also copied the under maintenance page as lsp/index.html and did a cosmetic edit
image

@liushuyu please look into this

Ok this might also have some other implications other than the LSP, after 10 minutes after restarting the fastCGI processor the gateway timeout error is back...

It's still a lot better with LSP disabled, before the website would be up for maybe half a minute

Edit: I restarted mysql as well as it was using a lot of system resources, everything seems to be stable for now.

Edit 2: it seems like something is wrong with the mysql database and LSP accessing it causes mysql to use all the system resources, so restarting mysql brings back the website.

So the problem has fixed. For the record, MySQL was hogging all the resources because the current data sets are too large, and the query is too costly.

The fix was to add an index to the database table like this:

CREATE INDEX comments_file_id ON comments(file_id);
CREATE INDEX comments_user_id ON comments(user_id);

This will make MySQL use the prebaked indexes when doing a query, thus reducing the query cost.