Little problem with lockfiles (on Windows)

If you run tt-rss on an officially unsupported platform (shared hosting, Windows, etc.) post here
User avatar
eliotcougar
Bear Rating Trainee
Bear Rating Trainee
Posts: 13
Joined: 03 Apr 2013, 21:22
Location: Puschino, Russia
Contact:

Little problem with lockfiles (on Windows)

Postby eliotcougar » 17 Apr 2013, 21:58

I haven't found any such reports on the forum... I know, I should get dedicated machine with Linux on it, but I have what I have, okay?

Update_daemon.php is running constantly as a windows service here with no problem, except after 2 days (86400*2) I'm starting to get warning messages in php_errors.log every minute:
PHP Warning: unlink(lock/update_daemon.lock): Permission denied in C:\...\...\include\rssfuncs.php on line 1183

I guess the problem is that file_is_locked($file) always returns false no matter what, so expire_lock_files($debug) always tries to unlink lockfile even if it's locked... At least on Windows 7 running Apache 2.2.21+PHP 5.4.12

mrboring
Bear Rating Trainee
Bear Rating Trainee
Posts: 8
Joined: 03 Apr 2013, 22:36

Re: Little problem with lockfiles (on Windows)

Postby mrboring » 17 Apr 2013, 22:31

I'm having exactly the same issue. However, I'm running: Windows 7 32bit, IIS7.5 and PHP 5.4.9.

Any assistance would be appreciated.

Thanks.

User avatar
eliotcougar
Bear Rating Trainee
Bear Rating Trainee
Posts: 13
Joined: 03 Apr 2013, 21:22
Location: Puschino, Russia
Contact:

Re: Little problem with lockfiles (on Windows)

Postby eliotcougar » 17 Apr 2013, 22:59

I've just increased the time in that function from 2 to 30 days (my average time between machine restarts, I guess)... I hope it wouldn't give me any side effects...

pir2
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 18 Apr 2013, 05:16

Re: Little problem with lockfiles (on Windows)

Postby pir2 » 18 Apr 2013, 05:19

Try creating a batch file and scheduling it with task scheduler.

I just set it up today and it seems to work. Followed the instructions with Google translate

https://www.google.ca/url?sa=t&source=w ... 8065,d.b2I

mrboring
Bear Rating Trainee
Bear Rating Trainee
Posts: 8
Joined: 03 Apr 2013, 22:36

Re: Little problem with lockfiles (on Windows)

Postby mrboring » 18 Apr 2013, 22:31

Thanks for the work arounds. Please could someone confirm if this is a bug or something I'm doing wrong.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Little problem with lockfiles (on Windows)

Postby fox » 18 Apr 2013, 22:33

Running on windows is not supported in any way.

GravityWell
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 13 Apr 2013, 01:48

Re: Little problem with lockfiles (on Windows)

Postby GravityWell » 19 Apr 2013, 05:52

I have the same issue with Win7. When I feel like it I've been stopping the update process and deleting the files in ttrss\lock and then it's back to normal until the next time. I guess a scheduled task would solve it since it would run and then exit, but then I wouldn't get to see the console. I guess I'll go that way eventually. It still seems to work fine despite the lock errors.

pir2
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 18 Apr 2013, 05:16

Re: Little problem with lockfiles (on Windows)

Postby pir2 » 19 Apr 2013, 20:51

If you want to see the console, you could set the computer to Auto Login, then add the batch file to startup folder.

batch file:

Code: Select all

:start
cd /D FullPath\TT-RSSFolder
php FullPath\TT-RSSFolder\update.php --feeds
PING 1.1.1.1 -n 1 -w 300000
goto start


This will update every 5 minutes.

Ping Wait: http://www.robvanderwoude.com/wait.php
Loop: http://www.computerhope.com/issues/ch001050.htm

mrboring
Bear Rating Trainee
Bear Rating Trainee
Posts: 8
Joined: 03 Apr 2013, 22:36

Re: Little problem with lockfiles (on Windows)

Postby mrboring » 19 Apr 2013, 21:17

Hi pir2

Thanks for your help. It looks interesting and I will give it a try.

User avatar
eliotcougar
Bear Rating Trainee
Bear Rating Trainee
Posts: 13
Joined: 03 Apr 2013, 21:22
Location: Puschino, Russia
Contact:

Re: Little problem with lockfiles (on Windows)

Postby eliotcougar » 19 Apr 2013, 21:19

No, that looks insane... If you want to see the console (I don't) just run update.php --daemon

mrboring
Bear Rating Trainee
Bear Rating Trainee
Posts: 8
Joined: 03 Apr 2013, 22:36

Re: Little problem with lockfiles (on Windows)

Postby mrboring » 19 Apr 2013, 22:01

Hi eliotcougar

I also had a high CPU issue. Pir2's solution might help with this.

GravityWell
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 13 Apr 2013, 01:48

Re: Little problem with lockfiles (on Windows)

Postby GravityWell » 19 Apr 2013, 22:27

I decided to go ahead and create a batch file with:

Code: Select all

<path>php.exe <path>update.php --feeds>>update_log.txt

And put that in a 5 minute scheduled task. This also allows me to link to update_log.txt via the browser if I want to confirm updates are being made.

There was a side effect that I kept getting the error "Update daemon is not running", so I commented out the error in the code. Not sure if there is a better way to handle that.

feader
Bear Rating Master
Bear Rating Master
Posts: 160
Joined: 26 Dec 2012, 20:03

Re: Little problem with lockfiles (on Windows)

Postby feader » 20 Apr 2013, 00:21

GravityWell wrote:There was a side effect that I kept getting the error "Update daemon is not running", so I commented out the error in the code. Not sure if there is a better way to handle that.

Delete the daemon's lock file in the subdirectory lock of your ttRSS directory.

GravityWell
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 13 Apr 2013, 01:48

Re: Little problem with lockfiles (on Windows)

Postby GravityWell » 20 Apr 2013, 06:29

feader wrote:
GravityWell wrote:There was a side effect that I kept getting the error "Update daemon is not running", so I commented out the error in the code. Not sure if there is a better way to handle that.

Delete the daemon's lock file in the subdirectory lock of your ttRSS directory.


Thanks, that works, and one less code change is good, so I will have less to patch on the next update(s).


Return to “Unsupported platforms”

Who is online

Users browsing this forum: No registered users and 2 guests