[Solved] cron error

Author Message

Seth Gottlieb

Thursday 07 January 2010 10:35:10 am

Hello,
I am trying to run cron and it is giving me the following errors:
Running cronjobs/unpublish.php
Forcing to steal the mutex lock: cronjobs/unpublish.php
Stealing mutex. Old process has run too long.
Failed to steal cronjob part lock.

...
When I run the command with the -d command, I get errors about file permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/5897675159451032af26dc892b1b2daf.php', perhaps wrong permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/746a445527de1cc496f7b7567782af30.php', perhaps wrong permissions

....

This happens even when I recursively set permissions to be open to everyone and when I run the command sudo'ing as root or apache. I can even create a file that var/cache/ini/ directory manually with "touch"
Does anyone know what may be happening here?
Here is my PHP information in case that helps
-sh-3.2$ php -v
PHP 5.2.6 (cli) (built: May 2 2008 16:06:40)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with the ionCube PHP Loader v3.1.29, Copyright (c) 2002-2007, by ionCube Ltd.
Thanks,
Seth

Robin Muilwijk

Friday 08 January 2010 1:33:25 am

Hi Seth,

I searched the forum and read some other topics where people had problems with cronjobs running more than once. This is indicated by the "trying to steal the mutex lock..." message.

In one of those threads it was suggested to clear all cache, could you try that?

Regards Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Jérôme Vieilledent

Friday 08 January 2010 6:04:45 am

"

When I run the command with the -d command, I get errors about file permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/5897675159451032af26dc892b1b2daf.php', perhaps wrong permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/746a445527de1cc496f7b7567782af30.php', perhaps wrong permissions

"

Hi Seth

It seems that your user that runs your cronjobs doesn't have write access to the cache folder... Best thing to do is to run your cronjobs from your webserver's user (e.g. www-data on debian)

Fere DZON-OKO

Tuesday 12 January 2010 9:21:51 am

I dont think that it's a problem of webserver's user.

I have the same errors and i run the cronjobs with the account "root".

You have an other idea ?

Thk

Yolfa

Seth Gottlieb

Friday 15 January 2010 8:18:43 am

Sorry to have been absent. I thought the forum was going to mail me when there was a reply. I thought there was a way to subscribe to a thread but I can't find it now.

Anyway....

I had searched the earlier forum posts and tried the clearing cache tip. I am also able to create a file in that directory. Below is the ouput. See at the bottom how I am able to touch and rm the file that the script was not able to create. Is it possible that the script is working from a different base directory?

Thanks,

Seth

Error: (eZINI)
Couldn't create cache file 'var/cache/ini/5897675159451032af26dc892b1b2daf.php', perhaps wrong permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/746a445527de1cc496f7b7567782af30.php', perhaps wrong permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/08c6779a7f1b56d73d70d35758e94096.php', perhaps wrong permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/87482013ec594c2d938b1eec4eccb6cb.php', perhaps wrong permissions
Timing: ()
Script cronjobs/notification.php starting
Warning: (PHP: E_WARNING)
fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/slateroofclient.com/httpdocs/scma/var/scma/cache/ezmutex owned by uid 48 in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Warning: (PHP: E_WARNING)
fopen(var/scma/cache/ezmutex/6f64141d26ca036109446d9c7184dd2d): failed to open stream: No such file or directory in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Error: ()
Failed to open file: var/scma/cache/ezmutex/6f64141d26ca036109446d9c7184dd2d
Warning: (PHP: E_WARNING)
fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/slateroofclient.com/httpdocs/scma/var/scma/cache/ezmutex owned by uid 48 in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Warning: (PHP: E_WARNING)
fopen(var/scma/cache/ezmutex/6f64141d26ca036109446d9c7184dd2d): failed to open stream: No such file or directory in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Error: ()
Failed to open file: var/scma/cache/ezmutex/6f64141d26ca036109446d9c7184dd2d
Warning: (PHP: E_WARNING)
fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/slateroofclient.com/httpdocs/scma/var/scma/cache/ezmutex owned by uid 48 in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Warning: (PHP: E_WARNING)
fopen(var/scma/cache/ezmutex/6f64141d26ca036109446d9c7184dd2d): failed to open stream: No such file or directory in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Error: ()
Failed to open file: var/scma/cache/ezmutex/6f64141d26ca036109446d9c7184dd2d
Timing: ()
Script cronjobs/notification.php done
Timing: ()
Script cronjobs/workflow.php starting
Warning: (PHP: E_WARNING)
fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/slateroofclient.com/httpdocs/scma/var/scma/cache/ezmutex owned by uid 48 in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Warning: (PHP: E_WARNING)
fopen(var/scma/cache/ezmutex/a1847e1bb5bf81edc3a166e3ee1847eb): failed to open stream: No such file or directory in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Error: ()
Failed to open file: var/scma/cache/ezmutex/a1847e1bb5bf81edc3a166e3ee1847eb
Warning: (PHP: E_WARNING)
fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/slateroofclient.com/httpdocs/scma/var/scma/cache/ezmutex owned by uid 48 in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Warning: (PHP: E_WARNING)
fopen(var/scma/cache/ezmutex/a1847e1bb5bf81edc3a166e3ee1847eb): failed to open stream: No such file or directory in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Error: ()
Failed to open file: var/scma/cache/ezmutex/a1847e1bb5bf81edc3a166e3ee1847eb
Warning: (PHP: E_WARNING)
fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/slateroofclient.com/httpdocs/scma/var/scma/cache/ezmutex owned by uid 48 in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Warning: (PHP: E_WARNING)
fopen(var/scma/cache/ezmutex/a1847e1bb5bf81edc3a166e3ee1847eb): failed to open stream: No such file or directory in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Error: ()
Failed to open file: var/scma/cache/ezmutex/a1847e1bb5bf81edc3a166e3ee1847eb
Timing: ()
Script cronjobs/workflow.php done
Total script time: 0.0972 sec
-sh-3.2$ touch var/cache/ini/5897675159451032af26dc892b1b2daf.php
-sh-3.2$ rm var/cache/ini/5897675159451032af26dc892b1b2daf.php
-sh-3.2$

Robin Muilwijk

Friday 15 January 2010 11:16:34 am

Hi Seth,

Can you check if it is possible for you to disable SAFE_MODE? I checked the forums on this, and it could be (part of) the problem.

About tracking/notification of new replies on this forum thread; if you are logged in and you have not used this feature yet, there is a button on the bottom of a thread to track changes.

Regards Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Robin Muilwijk

Monday 25 January 2010 10:54:44 am

Hi Seth,

Someone else with a similar problem solved it, see http://share.ez.no/forums/general/cronjob-error2

Regards Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Seth Gottlieb

Monday 25 January 2010 12:49:17 pm

Hi Robin,

Thanks for your reply. I had already tried clearing cache but turning Safe_Mode to Off did the trick.

Thanks!

Seth

Robin Muilwijk

Tuesday 26 January 2010 2:03:09 am

Glad to see this is fixed, thanks for sharing the solution.

-- Robin

P.S. Could you edit your first post, add [RESOLVED] in front of the subject? Thanks

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Nicolas Pastorino

Monday 01 February 2010 9:09:30 am

"

Sorry to have been absent. I thought the forum was going to mail me when there was a reply. I thought there was a way to subscribe to a thread but I can't find it now.

"

Hi Seth,

Good to see your issue solved. You may want to edit the original post and prepend the '[Solved]' phrase (waiting for a simple and clear button 'Mark as solved' :) ).

As for the notifications, you should be able, when editing a forum topic or reply, to check the "Track this reply" checkbox right beside the "OK" and "Cancel" buttons below the text editor. This makes sure you are notified whenever a new reply is posted in the thread. Also, make sure the email you provided is valid. And last, check the spam folder, automatic emails sometimes land there. You can also check your notification settings here: http://share.ez.no/notification/settings.

Cheers !

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 03:00:22
Script start
Timing: Jan 18 2025 03:00:22
Module start 'layout'
Timing: Jan 18 2025 03:00:22
Module start 'content'
Timing: Jan 18 2025 03:00:22
Module end 'content'
Timing: Jan 18 2025 03:00:22
Script end

Main resources:

Total runtime0.6786 sec
Peak memory usage4,096.0000 KB
Database Queries85

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 587.7891152.6094
Module start 'layout' 0.00520.0025 740.398439.4141
Module start 'content' 0.00780.6693 779.8125789.9297
Module end 'content' 0.67710.0014 1,569.742232.1875
Script end 0.6786  1,601.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4908160.0002
Check MTime0.00130.1965160.0001
Mysql Total
Database connection0.00070.101410.0007
Mysqli_queries0.570384.0481850.0067
Looping result0.00100.1465830.0000
Template Total0.651195.920.3256
Template load0.00210.311420.0011
Template processing0.649095.636020.3245
Template load and register function0.00010.016710.0001
states
state_id_array0.00080.120810.0008
state_identifier_array0.00110.155020.0005
Override
Cache load0.00230.33401470.0000
Sytem overhead
Fetch class attribute can translate value0.00090.137150.0002
Fetch class attribute name0.00150.2220140.0001
XML
Image XML parsing0.00270.404850.0005
class_abstraction
Instantiating content class attribute0.00000.0062190.0000
General
dbfile0.00120.1810370.0000
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
9content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
15content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 43
 Number of unique templates used: 9

Time used to render debug report: 0.0001 secs