Page 1 of 1

Little problem with lockfiles (on Windows)

Posted: 17 Apr 2013, 21:58
by eliotcougar
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

Re: Little problem with lockfiles (on Windows)

Posted: 17 Apr 2013, 22:31
by mrboring
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.

Re: Little problem with lockfiles (on Windows)

Posted: 17 Apr 2013, 22:59
by eliotcougar
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...

Re: Little problem with lockfiles (on Windows)

Posted: 18 Apr 2013, 05:19
by pir2
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

Re: Little problem with lockfiles (on Windows)

Posted: 18 Apr 2013, 22:31
by mrboring
Thanks for the work arounds. Please could someone confirm if this is a bug or something I'm doing wrong.

Re: Little problem with lockfiles (on Windows)

Posted: 18 Apr 2013, 22:33
by fox
Running on windows is not supported in any way.

Re: Little problem with lockfiles (on Windows)

Posted: 19 Apr 2013, 05:52
by GravityWell
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.

Re: Little problem with lockfiles (on Windows)

Posted: 19 Apr 2013, 20:51
by pir2
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

Re: Little problem with lockfiles (on Windows)

Posted: 19 Apr 2013, 21:17
by mrboring
Hi pir2

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

Re: Little problem with lockfiles (on Windows)

Posted: 19 Apr 2013, 21:19
by eliotcougar
No, that looks insane... If you want to see the console (I don't) just run update.php --daemon

Re: Little problem with lockfiles (on Windows)

Posted: 19 Apr 2013, 22:01
by mrboring
Hi eliotcougar

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

Re: Little problem with lockfiles (on Windows)

Posted: 19 Apr 2013, 22:27
by GravityWell
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.

Re: Little problem with lockfiles (on Windows)

Posted: 20 Apr 2013, 00:21
by feader
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.

Re: Little problem with lockfiles (on Windows)

Posted: 20 Apr 2013, 06:29
by GravityWell
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).