FreshRSS / FreshRSS

A free, self-hostable news aggregator…
https://freshrss.org
GNU Affero General Public License v3.0
8.87k stars 786 forks source link

[QUERY]Update page shows last version unknown #6008

Closed vdbhb59 closed 5 months ago

vdbhb59 commented 6 months ago

In the image below, as you can see there is the line stating: "An update of FreshRSS is available: Version unknown." & below it states "Last check = unknown". I went through the code, and there is a file called "last_update.txt", which seems to be missing for my deployment of the instance. Can you guide me, what path should this file be in and what should the file contain to get the above 2 points showing correct data, please? https://github.com/FreshRSS/FreshRSS/blob/77108ea19e725022e6168753d19037d781b4f8fe/app/Controllers/updateController.php#L6

Commented here: https://github.com/FreshRSS/FreshRSS/commit/9c104ee6bb81b6bf82b45355ef59709ce783488a#commitcomment-135967818

293474965-14de2c99-3e31-405b-8843-b0ec1a4cb0aa

Alkarex commented 6 months ago

Please provide information about your setup (OS, versions, type of deployment...)

vdbhb59 commented 6 months ago

CentOS 7 Manual ZIP installation Version 1.23.1-Stable PHP 8.0.30 All permissions in place

Info: The file "last_update.txt" may have been deleted in error, while I was trying to delete a folder, but I am not fully sure. I believe if I just recreate the text file and put in the version number, this issue will get fixed automatically.

Alkarex commented 6 months ago

And what happens when you click "Start update"?

vdbhb59 commented 6 months ago

Info: The file "last_update.txt" may have been deleted in error, while I was trying to delete a folder, but I am not fully sure. I believe if I just recreate the text file and put in the version number, this issue will get fixed automatically.

@Alkarex updated above about file I may have deleted in error.

And what happens when you click "Start update"?

It just goes round and round (updating) and then does nothing, but instead times out. This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.

No logs in UI, nor in /data/users/**/log file.

image

Alkarex commented 6 months ago

Since you seem to have command-line access to your server, I can propose that you upgrade to using git to control FreshRSS versions (it will still be possible to update through the Web interface with that method):

See https://github.com/FreshRSS/FreshRSS/discussions/5991#discussioncomment-7964751

ZIP is primarily meant for those who only have FTP access to a shared Web server and is the least robust method.

vdbhb59 commented 6 months ago

Since you seem to have command-line access to your server, I can propose that you upgrade to using git to control FreshRSS versions (it will still be possible to update through the Web interface with that method):

See #5991 (comment)

ZIP is primarily meant for those who only have FTP access to a shared Web server and is the least robust method.

I have jail access and not full level access. Plus git on my server works only via cPanel and not via terminal.

Hence need to have zip mode only.

Also, as I have mentioned, I just need the path where the "last_update.txt" resides. If you give me the path, I will get this fixed hopefully.

vdbhb59 commented 6 months ago

@Alkarex okay, I requested access to git and terminal git and ran those commands to get things cleaned out and even updated to 1.23.2-dev from 1.23.1-stable. I can see everything working, but just this version issue is still there, mate. What to do about that?

image

math-GH commented 6 months ago

Let me explain a bit the current mechanism behind the update checking procedure. @Alkarex , @Frenzie please correct me if there is something not correct. It will be a bit technically.

The update checking and the update will be done by https://github.com/FreshRSS/FreshRSS/blob/edge/app/Controllers/updateController.php

The update mechanism depends a bit of how you installed FreshRSS. If you there is the (maybe hidden) .git folder, than FreshRSS uses the Git update mechanism. If the folder is not there, than the mechanism will trigger update.freshrss.org

If it is a Git update mechanism the version would be the branch name.

But there is also the thing around the last_update.txt. If this file is empty, then the version is unknown. If the file is missing the last check timestamp will be unknown.

Summary: Please check that there is the last_update.txt file in data folder and it has the correct attributes that the application can read the file.

math-GH commented 6 months ago

One more thing: you are using the Rolling Release channel and not the Stable channel. Is it by purpose?

vdbhb59 commented 6 months ago

One more thing: you are using the Rolling Release channel and not the Stable channel. Is it by purpose?

Actually, I did that just to check the git commands were working for me or not (I had to request from my hosting provider for cli git access for this one), and the git works, so I was just trying to check things. I will be reverting to stable once the next stable version releases.

BTW, the last_update.txt as I had mentioned initially was missing (I remember inadvertently deleting it, but had forgotten the path). I recreated it just now and added the text (1.23.2-dev) and it is showing the proper details. However, one thing. It still shows "An update of FreshRSS is available: Version 1.23.2-dev.", even when I already have 1.23.2-dev, and and even though I did check git update via cli. I clicked on "Start Update" button, and as usual it just goes round and round (updating) and then does nothing, but instead times out. This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.

image

math-GH commented 6 months ago

The file last_update.txt is not part of the install package. It will created with the first click on the check button.

The timeout could be an issue of your server. What is your current setting of PHP memory_limit and max_execution_time (check your server admin panel or the phpinfo())?

vdbhb59 commented 6 months ago

The file last_update.txt is not part of the install package. It will created with the first click on the check button.

The timeout could be an issue of your server. What is your current setting of PHP memory_limit and max_execution_time (check your server admin panel or the phpinfo())?

Thanks for that mate. time is 30 seconds limit is 128mb since it is shared hosting, I am not allowed to set it higher, even though I can go up to 600 seconds and 1024mb respectively.

math-GH commented 6 months ago

I do not have experiences with this tiny server environment. My used cheap shared hosting provider environment: max_execution_time: 60 s, memory_limit: 256 MB. From my update experiences in the past I would say that 30seconds could be too tight. The update creates a backup of your data folder that consumes some time before it updates the files. Have you checked your setting with a clean fresh instance?

Ping @Alkarex @Frenzie @marienfressinaud : Do you have experiences with minimum settings? Should we add more information in our help center? https://freshrss.github.io/FreshRSS/en/admins/02_Prerequisites.html

Frenzie commented 6 months ago

I've never changed the default timeout of 30 s myself. I just tried to update from 1.22.1 and for the first time ever I reached a timeout. So there's definitely something exceptional going on. I don't have time to investigate right now; perhaps a more demanding DB schema update than usual?

Ping @Alkarex @Frenzie @marienfressinaud : Do you have experiences with minimum settings? Should we add more information in our help center? https://freshrss.github.io/FreshRSS/en/admins/02_Prerequisites.html

In principle I think as low as 64 MB (for PHP and only PHP, mind you) is probably okay. In practice of course I'd recommend at least 128 to give you a lot more wiggle room. It might also be worth keeping in mind that the default is 256.

Note that if SQLite counts towards the PHP process you'd certainly need at least 128 MB, probably at least 256 MB. I quickly checked in combination with MariaDB and never saw more than 40 MB from PHP, but MariaDB was taking 130+ MB.

vdbhb59 commented 6 months ago

I do not have experiences with this tiny server environment. My used cheap shared hosting provider environment: max_execution_time: 60 s, memory_limit: 256 MB. From my update experiences in the past I would say that 30seconds could be too tight. The update creates a backup of your data folder that consumes some time before it updates the files. Have you checked your setting with a clean fresh instance?

Ping @Alkarex @Frenzie @marienfressinaud : Do you have experiences with minimum settings? Should we add more information in our help center? https://freshrss.github.io/FreshRSS/en/admins/02_Prerequisites.html

I have never faced issue with my limits on FreshRSS instance. I have been hosting for more than 9 months now, without any issues tbvh. The trouble here seems to be coming from something else, or maybe with the newer versions, the resources and usage may have gone up (I am not sure there). I can pay my provider for some high resources availability, but my main reason to go with FRSS is due to the simplicity and low resource consumption, and the friendly developers. I would not dream of or even think of moving out of FRSS honestly.

I've never changed the default timeout of 30 s myself. I just tried to update from 1.22.1 and for the first time ever I reached a timeout. So there's definitely something exceptional going on. I don't have time to investigate right now; perhaps a more demanding DB schema update than usual?

Ping @Alkarex @Frenzie @marienfressinaud : Do you have experiences with minimum settings? Should we add more information in our help center? https://freshrss.github.io/FreshRSS/en/admins/02_Prerequisites.html

In principle I think as low as 64 MB (for PHP and only PHP, mind you) is probably okay. In practice of course I'd recommend at least 128 to give you a lot more wiggle room. It might also be worth keeping in mind that the default is 256.

Note that if SQLite counts towards the PHP process you'd certainly need at least 128 MB, probably at least 256 MB. I quickly checked in combination with MariaDB and never saw more than 40 MB from PHP, but MariaDB was taking 130+ MB.

Thankfully, I use MySQL and not SQLite or MariaDB, and even there the resource usage is very low, which I am more than happy about. My MySQL does not use more than 30-45MB (very rare does it hit 64MB).

Honestly, I am really happy with FreshRSS, and in literally every way possible. :)

Alkarex commented 6 months ago

perhaps a more demanding DB schema update than usual

There is no special update at all, besides downloading the archive and unzipping the content, so some additional debugging would be needed. There is still a long standing draft to rework the ZIP update, waiting for a good soul https://github.com/FreshRSS/FreshRSS/pull/1760

Frenzie commented 6 months ago

Probably a false alarm on my end, more or less anyway. Note the versions listed. Something about the process seems to be going tremendously slow though in a way I don't recall seeing previously. [Edit: that is, it took minutes. No timeouts for me.]

image

Edit: I removed update.php myself and overwrote everything with the release .tar.gz for good measure.

vdbhb59 commented 6 months ago

I just redid the git clear and refresh from here: https://github.com/FreshRSS/FreshRSS/discussions/5991#discussioncomment-7964751. Now the update function works as it should. image

image

vdbhb59 commented 6 months ago

Just one point. The rolling edge version changelog option still redirects to the last release changelog instead of edge tree commits (maybe?).