MySQLTalk.org Forum Index MySQLTalk.org
MYSQL discussions groups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

release lock

 
Post new topic   Reply to topic    MySQLTalk.org Forum Index -> Eventum General Discussion
View previous topic :: View next topic  
Author Message
Schalk Neethling
Guest





PostPosted: Tue May 01, 2007 3:59 am    Post subject: release lock Reply with quote



Hi everyone,

Before I go and re-invent the wheel, has anyone written a PHP script to
release the lock when mails starts to fail because of a lock?

We are currently experiencing this problem frequently, the job is
triggered and fails because there is a lock on the process. So far, we
have figured out that there is a specific file that contains the lock
and when deleting this file, the mail process starts running again.

With frequent network problems we are foreseeing this to be a recurrent
problem so I want to write a simple PHP script to clear out the locks in
these cases, as they seem to be kept in a specific folder, if memory
serves me correctly the folder is actually called locks.

Thanks
Schalk
Back to top
Baker, James
Guest





PostPosted: Tue May 01, 2007 4:14 am    Post subject: RE: release lock Reply with quote



Process_mail_fix_filelock.cmd:
@echo off
rem You will need to update this batch file with the right locations for
files.
set RUNDIR=c:\www_public\web\tracker-it\misc
set OUTDIR=c:\www_server\cron\logs
set PHPDIR=c:\www_server\php
now >> %OUTDIR%\output.log
pushd %RUNDIR%
time /t >time.txt
type time.txt
echo Fixing Mail Queue... Please Hold
%PHPDIR%\php process_mail_queue.php --fix-lock >>%OUTDIR%\output.log
popd


Jim

-----Original Message-----
From: Schalk Neethling [mailto:schalk (AT) alliedbridge (DOT) com]
Sent: Monday, April 30, 2007 5:59 PM
To: eventum-users (AT) lists (DOT) mysql.com
Subject: release lock

Hi everyone,

Before I go and re-invent the wheel, has anyone written a PHP script to
release the lock when mails starts to fail because of a lock?

We are currently experiencing this problem frequently, the job is
triggered and fails because there is a lock on the process. So far, we
have figured out that there is a specific file that contains the lock
and when deleting this file, the mail process starts running again.

With frequent network problems we are foreseeing this to be a recurrent
problem so I want to write a simple PHP script to clear out the locks in
these cases, as they seem to be kept in a specific folder, if memory
serves me correctly the folder is actually called locks.

Thanks
Schalk

--
Eventum Users Mailing List
For list archives: http://lists.mysql.com/eventum-users
To unsubscribe:
http://lists.mysql.com/eventum-users?unsub=james.baker (AT) citigroup (DOT) com
Back to top
Schalk Neethling
Guest





PostPosted: Tue May 01, 2007 10:10 am    Post subject: Re: release lock Reply with quote



Thanks Jim.

Baker, James wrote:
Quote:
Process_mail_fix_filelock.cmd:
@echo off
rem You will need to update this batch file with the right locations for
files.
set RUNDIR=c:\www_public\web\tracker-it\misc
set OUTDIR=c:\www_server\cron\logs
set PHPDIR=c:\www_server\php
now >> %OUTDIR%\output.log
pushd %RUNDIR%
time /t >time.txt
type time.txt
echo Fixing Mail Queue... Please Hold
%PHPDIR%\php process_mail_queue.php --fix-lock >>%OUTDIR%\output.log
popd


Jim

-----Original Message-----
From: Schalk Neethling [mailto:schalk (AT) alliedbridge (DOT) com]
Sent: Monday, April 30, 2007 5:59 PM
To: eventum-users (AT) lists (DOT) mysql.com
Subject: release lock

Hi everyone,

Before I go and re-invent the wheel, has anyone written a PHP script to
release the lock when mails starts to fail because of a lock?

We are currently experiencing this problem frequently, the job is
triggered and fails because there is a lock on the process. So far, we
have figured out that there is a specific file that contains the lock
and when deleting this file, the mail process starts running again.

With frequent network problems we are foreseeing this to be a recurrent
problem so I want to write a simple PHP script to clear out the locks in
these cases, as they seem to be kept in a specific folder, if memory
serves me correctly the folder is actually called locks.

Thanks
Schalk

--
Eventum Users Mailing List
For list archives: http://lists.mysql.com/eventum-users
To unsubscribe:
http://lists.mysql.com/eventum-users?unsub=james.baker (AT) citigroup (DOT) com


Back to top
Gaetano Giunta
Guest





PostPosted: Tue May 08, 2007 10:10 am    Post subject: RE: release lock Reply with quote

Ok, here's the patch we developed. We tested it on our setup, and, for us, it works.

In short: all the code is in fact already present in Eventum. All you need to make the timeout parameter 'appear' in your config is modify the template used for the general setup config page.

Please find attached the modified templates, for both version 1.7.1 and 2.0

Drop one of them on your install (make a backup first of the old template at least, or if you have time and space of the whole thing), logon as an admin user, goto general settings and set up a timeout. You're done. (just make sure your setup.conf.php is temporarily writable).

We are experimenting with 60/90 secs timeouts, but I guess it depends a lot on the size of the emails you exchange (ie. do users attach big files to those mails?)

Bye
Gaetano


Quote:
-----Original Message-----
From: Schalk Neethling [mailto:schalk (AT) alliedbridge (DOT) com]
Sent: Wednesday, May 02, 2007 11:22 PM
To: Gaetano Giunta
Subject: Re: release lock


Thanks, I did see your post. If at all possible can you send
some code
my way Smile Thanks!

Gaetano Giunta wrote:
You might also take a look at my previous posts on the subject.

In our case we traced down the lock being created and never
released due to unstable communication between the eventum
server and the mail server. The php script in charge of
sending mail has no bultin timeout, and sometimes it hangs forever.

I set up a timeout value, and now everything is fine.
Every now and then the mail sending process errors, but the
mails left in the queue get send at the next round (we send
mail every 5 mins)

bye
Gaetano


-----Original Message-----
From: Schalk Neethling [mailto:schalk (AT) alliedbridge (DOT) com]
Sent: Tuesday, May 01, 2007 11:42 AM
To: Baker, James
Cc: eventum-users (AT) lists (DOT) mysql.com
Subject: Re: release lock


Thanks Jim.

Baker, James wrote:

Process_mail_fix_filelock.cmd:
@echo off
rem You will need to update this batch file with the right

locations for

files.
set RUNDIR=c:\www_public\web\tracker-it\misc
set OUTDIR=c:\www_server\cron\logs
set PHPDIR=c:\www_server\php
now >> %OUTDIR%\output.log
pushd %RUNDIR%
time /t >time.txt
type time.txt
echo Fixing Mail Queue... Please Hold
%PHPDIR%\php process_mail_queue.php --fix-lock
%OUTDIR%\output.log
popd


Jim

-----Original Message-----
From: Schalk Neethling [mailto:schalk (AT) alliedbridge (DOT) com]
Sent: Monday, April 30, 2007 5:59 PM
To: eventum-users (AT) lists (DOT) mysql.com
Subject: release lock

Hi everyone,

Before I go and re-invent the wheel, has anyone written a

PHP script to

release the lock when mails starts to fail because of a lock?

We are currently experiencing this problem frequently, the job is
triggered and fails because there is a lock on the process.

So far, we

have figured out that there is a specific file that

contains the lock

and when deleting this file, the mail process starts
running again.

With frequent network problems we are foreseeing this to be

a recurrent

problem so I want to write a simple PHP script to clear out

the locks in

these cases, as they seem to be kept in a specific
folder, if memory
serves me correctly the folder is actually called locks.

Thanks
Schalk

--
Eventum Users Mailing List
For list archives: http://lists.mysql.com/eventum-users
To unsubscribe:

http://lists.mysql.com/eventum-users?unsub=james.baker (AT) citigroup (DOT) com




--
Eventum Users Mailing List
For list archives: http://lists.mysql.com/eventum-users
To unsubscribe:
http://lists.mysql.com/eventum-users?unsub=giunta.gaetano@sea-

aeroportimilano.it





Back to top
Gaetano Giunta
Guest





PostPosted: Tue May 08, 2007 5:44 pm    Post subject: RE: release lock Reply with quote

Quote:
-----Original Message-----
From: Barry Benowitz [mailto:barry.benowitz (AT) raritan (DOT) com]
Sent: Tuesday, May 08, 2007 2:35 PM
To: Gaetano Giunta
Subject: RE: release lock


Would you post this patch to eventum_users again. It wasn't really
attached.

Thanks,

Barry


-----Original Message-----
From: Gaetano Giunta [mailto:giunta.gaetano@sea-aeroportimilano.it]
Sent: Tuesday, May 08, 2007 4:58 AM
To: schalk (AT) alliedbridge (DOT) com
Cc: eventum-users (AT) lists (DOT) mysql.com; Gianotti Alberto
Subject: RE: release lock

Ok, here's the patch we developed. We tested it on our setup, and, for
us, it works.

In short: all the code is in fact already present in Eventum. All you
need to make the timeout parameter 'appear' in your config is
modify the
template used for the general setup config page.

Please find attached the modified templates, for both version
1.7.1 and
2.0

Drop one of them on your install (make a backup first of the old
template at least, or if you have time and space of the whole thing),
logon as an admin user, goto general settings and set up a timeout.
You're done. (just make sure your setup.conf.php is temporarily
writable).

We are experimenting with 60/90 secs timeouts, but I guess it
depends a
lot on the size of the emails you exchange (ie. do users attach big
files to those mails?)

Bye
Gaetano


-----Original Message-----
From: Schalk Neethling [mailto:schalk (AT) alliedbridge (DOT) com]
Sent: Wednesday, May 02, 2007 11:22 PM
To: Gaetano Giunta
Subject: Re: release lock


Thanks, I did see your post. If at all possible can you send
some code
my way Smile Thanks!

Gaetano Giunta wrote:
You might also take a look at my previous posts on the subject.

In our case we traced down the lock being created and never
released due to unstable communication between the eventum
server and the mail server. The php script in charge of
sending mail has no bultin timeout, and sometimes it hangs forever.

I set up a timeout value, and now everything is fine.
Every now and then the mail sending process errors, but the
mails left in the queue get send at the next round (we send
mail every 5 mins)

bye
Gaetano


-----Original Message-----
From: Schalk Neethling [mailto:schalk (AT) alliedbridge (DOT) com]
Sent: Tuesday, May 01, 2007 11:42 AM
To: Baker, James
Cc: eventum-users (AT) lists (DOT) mysql.com
Subject: Re: release lock


Thanks Jim.

Baker, James wrote:

Process_mail_fix_filelock.cmd:
@echo off
rem You will need to update this batch file with the right

locations for

files.
set RUNDIR=c:\www_public\web\tracker-it\misc
set OUTDIR=c:\www_server\cron\logs
set PHPDIR=c:\www_server\php
now >> %OUTDIR%\output.log
pushd %RUNDIR%
time /t >time.txt
type time.txt
echo Fixing Mail Queue... Please Hold
%PHPDIR%\php process_mail_queue.php --fix-lock
%OUTDIR%\output.log
popd


Jim

-----Original Message-----
From: Schalk Neethling [mailto:schalk (AT) alliedbridge (DOT) com]
Sent: Monday, April 30, 2007 5:59 PM
To: eventum-users (AT) lists (DOT) mysql.com
Subject: release lock

Hi everyone,

Before I go and re-invent the wheel, has anyone written a

PHP script to

release the lock when mails starts to fail because of a lock?

We are currently experiencing this problem frequently,
the job is
triggered and fails because there is a lock on the process.

So far, we

have figured out that there is a specific file that

contains the lock

and when deleting this file, the mail process starts
running again.

With frequent network problems we are foreseeing this to be

a recurrent

problem so I want to write a simple PHP script to clear out

the locks in

these cases, as they seem to be kept in a specific
folder, if memory
serves me correctly the folder is actually called locks.

Thanks
Schalk

--
Eventum Users Mailing List
For list archives: http://lists.mysql.com/eventum-users
To unsubscribe:

http://lists.mysql.com/eventum-users?unsub=james.baker (AT) citigroup (DOT) com




--
Eventum Users Mailing List
For list archives: http://lists.mysql.com/eventum-users
To unsubscribe:
http://lists.mysql.com/eventum-users?unsub=giunta.gaetano@sea-

aeroportimilano.it






Back to top
Schalk Neethling
Guest





PostPosted: Wed May 09, 2007 12:15 am    Post subject: Re: release lock Reply with quote

Thanks a million!!!!

Gaetano Giunta wrote:
Quote:

-----Original Message-----
From: Barry Benowitz [mailto:barry.benowitz (AT) raritan (DOT) com]
Sent: Tuesday, May 08, 2007 2:35 PM
To: Gaetano Giunta
Subject: RE: release lock


Would you post this patch to eventum_users again. It wasn't really
attached.

Thanks,

Barry


-----Original Message-----
From: Gaetano Giunta [mailto:giunta.gaetano@sea-aeroportimilano.it]
Sent: Tuesday, May 08, 2007 4:58 AM
To: schalk (AT) alliedbridge (DOT) com
Cc: eventum-users (AT) lists (DOT) mysql.com; Gianotti Alberto
Subject: RE: release lock

Ok, here's the patch we developed. We tested it on our setup, and, for
us, it works.

In short: all the code is in fact already present in Eventum. All you
need to make the timeout parameter 'appear' in your config is
modify the
template used for the general setup config page.

Please find attached the modified templates, for both version
1.7.1 and
2.0

Drop one of them on your install (make a backup first of the old
template at least, or if you have time and space of the whole thing),
logon as an admin user, goto general settings and set up a timeout.
You're done. (just make sure your setup.conf.php is temporarily
writable).

We are experimenting with 60/90 secs timeouts, but I guess it
depends a
lot on the size of the emails you exchange (ie. do users attach big
files to those mails?)

Bye
Gaetano



-----Original Message-----
From: Schalk Neethling [mailto:schalk (AT) alliedbridge (DOT) com]
Sent: Wednesday, May 02, 2007 11:22 PM
To: Gaetano Giunta
Subject: Re: release lock


Thanks, I did see your post. If at all possible can you send
some code
my way Smile Thanks!

Gaetano Giunta wrote:

You might also take a look at my previous posts on the subject.

In our case we traced down the lock being created and never

released due to unstable communication between the eventum
server and the mail server. The php script in charge of
sending mail has no bultin timeout, and sometimes it hangs forever.

I set up a timeout value, and now everything is fine.
Every now and then the mail sending process errors, but the

mails left in the queue get send at the next round (we send
mail every 5 mins)

bye
Gaetano



-----Original Message-----
From: Schalk Neethling [mailto:schalk (AT) alliedbridge (DOT) com]
Sent: Tuesday, May 01, 2007 11:42 AM
To: Baker, James
Cc: eventum-users (AT) lists (DOT) mysql.com
Subject: Re: release lock


Thanks Jim.

Baker, James wrote:


Process_mail_fix_filelock.cmd:
@echo off
rem You will need to update this batch file with the right


locations for


files.
set RUNDIR=c:\www_public\web\tracker-it\misc
set OUTDIR=c:\www_server\cron\logs
set PHPDIR=c:\www_server\php
now >> %OUTDIR%\output.log
pushd %RUNDIR%
time /t >time.txt
type time.txt
echo Fixing Mail Queue... Please Hold
%PHPDIR%\php process_mail_queue.php --fix-lock

%OUTDIR%\output.log

popd


Jim

-----Original Message-----
From: Schalk Neethling [mailto:schalk (AT) alliedbridge (DOT) com]
Sent: Monday, April 30, 2007 5:59 PM
To: eventum-users (AT) lists (DOT) mysql.com
Subject: release lock

Hi everyone,

Before I go and re-invent the wheel, has anyone written a


PHP script to


release the lock when mails starts to fail because of a lock?

We are currently experiencing this problem frequently,

the job is

triggered and fails because there is a lock on the process.


So far, we


have figured out that there is a specific file that


contains the lock


and when deleting this file, the mail process starts

running again.

With frequent network problems we are foreseeing this to be


a recurrent


problem so I want to write a simple PHP script to clear out


the locks in


these cases, as they seem to be kept in a specific

folder, if memory

serves me correctly the folder is actually called locks.

Thanks
Schalk

--
Eventum Users Mailing List
For list archives: http://lists.mysql.com/eventum-users
To unsubscribe:


http://lists.mysql.com/eventum-users?unsub=james.baker (AT) citigroup (DOT) com




--
Eventum Users Mailing List
For list archives: http://lists.mysql.com/eventum-users
To unsubscribe:
http://lists.mysql.com/eventum-users?unsub=giunta.gaetano@sea-


aeroportimilano.it






------------------------------------------------------------------------



------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.467 / Virus Database: 269.6.5/793 - Release Date: 2007/05/07 02:55 PM
Back to top
Elan Ruusamäe
Guest





PostPosted: Thu May 10, 2007 10:10 am    Post subject: Re: release lock Reply with quote

On Tuesday 08 May 2007, Gaetano Giunta wrote:
Quote:
Ok, here's the patch we developed. We tested it on our setup, and, for us,
it works.

the email did not contain any patch attachment. neither did the resent ones.
is maillng list eating the attachment or there isn't any "patch" at all (diff
to modified files)


Quote:
In short: all the code is in fact already present in Eventum. All you need
to make the timeout parameter 'appear' in your config is modify the
template used for the general setup config page.

Please find attached the modified templates, for both version 1.7.1 and 2.0

Drop one of them on your install (make a backup first of the old template
at least, or if you have time and space of the whole thing), logon as an
admin user, goto general settings and set up a timeout. You're done. (just
make sure your setup.conf.php is temporarily writable).

We are experimenting with 60/90 secs timeouts, but I guess it depends a lot
on the size of the emails you exchange (ie. do users attach big files to
those mails?)

Bye
Gaetano


--
glen
Back to top
Gaetano Giunta
Guest





PostPosted: Thu May 10, 2007 10:10 am    Post subject: RE: release lock Reply with quote

Quote:
Ok, here's the patch we developed. We tested it on our
setup, and, for us, it works.

the email did not contain any patch attachment. neither did
the resent ones.
is maillng list eating the attachment or there isn't any
"patch" at all (diff
to modified files)

I am sorry, but this turning out to be tougher than expected:

- ml does not allow to post mails with long bodies
- it does not allow to post attachments, either, apparently

I am now sending the templates privately to ppl that ask for them, but maybe there is some better fix for the long term???

Bye
Gaetano
Back to top
Eliot Blennerhassett
Guest





PostPosted: Fri May 11, 2007 2:01 am    Post subject: Re: release lock Reply with quote

Gaetano Giunta wrote:
Quote:
I am now sending the templates privately to ppl that ask for them, but maybe there is some better fix for the long term???

Please Put them on the eventum wiki, create a new page here

http://eventum.mysql.org/wiki/index.php/Pending_Contributions

regards
--
Eliot Blennerhassett *:-{)>
Back to top
Gaetano Giunta
Guest





PostPosted: Fri May 11, 2007 10:11 am    Post subject: RE: release lock Reply with quote

I put up the modified templates on the pending contributions page:

http://eventum.mysql.org/wiki/index.php/Pending_Contributions


Everyone volunteering to make diffs out of the complete source is welcomed (I know I'm a lazy guy, thank you).

Bye
Gaetano
Back to top
Display posts from previous:   
Post new topic   Reply to topic    MySQLTalk.org Forum Index -> Eventum General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.