help me keep my ancient server alive?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

help me keep my ancient server alive?

Todd Vainisi-2
Hi List,

Long time no lasso talk!  I have an old cent os 5 server that has lasso 8.1 on it .  Something constantly happens to push the Lasso8Service to many gigs of memory until the sites all crash.  I ssh in and issue lasso8ctl restart and the problem goes away.  It used to take weeks between restarts, but now it is usually just a day or two, sometimes even less.

I’ve tried to write a shell script to execute from cron to just automatically restart lasso twice a day.  I can run this script from the command line and it executes perfectly.  But from cron, not so much.  The output from the script seems correct (it shows it has a good $PATH and I get output that says "Restarting Lasso Service: Done”), but my sites all crash as a result.

Any ideas why it doesn’t work from cron?

Here is the sh script (real complicated):

#!/bin/bash

export PATH="$PATH:/usr/sbin"
echo $PATH
lasso8ctl restart

******************
and the output (emailed to me by cron):

/usr/bin:/bin:/usr/sbin
Restarting Lasso Service: Done

Todd Vainisi





#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: help me keep my ancient server alive?

stevepiercy
Aside from the cron job...

Lack of disk space?

Massive log or sqlite files?

As far as the cron job, does it run as root?

--steve


On 7/1/18 at 10:32 AM, [hidden email] (Todd
Vainisi) pronounced:

>Hi List,
>
>Long time no lasso talk!  I have an old cent os 5 server that
>has lasso 8.1 on it .  Something constantly happens to push the
>Lasso8Service to many gigs of memory until the sites all
>crash.  I ssh in and issue lasso8ctl restart and the problem
>goes away.  It used to take weeks between restarts, but now it
>is usually just a day or two, sometimes even less.
>I’ve tried to write a shell script to execute from cron to
>just automatically restart lasso twice a day.  I can run this
>script from the command line and it executes perfectly.  But
>from cron, not so much.  The output from the script seems
>correct (it shows it has a good $PATH and I get output that
>says "Restarting Lasso Service: Done”), but my sites all
>crash as a result.
>
>Any ideas why it doesn’t work from cron?
>
>Here is the sh script (real complicated):
>
>#!/bin/bash
>
>export PATH="$PATH:/usr/sbin"
>echo $PATH
>lasso8ctl restart
>
>******************
>and the output (emailed to me by cron):
>
>/usr/bin:/bin:/usr/sbin
>Restarting Lasso Service: Done
>
>Todd Vainisi
>
>
>
>
>
>#############################################################
>
>This message is sent to you because you are subscribed to
>the mailing list Lasso [hidden email]
>Official list archives available at http://www.lassotalk.com
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy              Website Builder              Eugene, OR
<[hidden email]>               <http://www.stevepiercy.com/>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: help me keep my ancient server alive?

Marc Pope-2
In reply to this post by Todd Vainisi-2
I have a server with a cron like this, make sure you are running it as root in /etc/crontab

01 05 * * * root service mysqld restart; service httpd restart; lasso8ctl restart

I don’t even use a external script.


> On Jul 1, 2018, at 10:32 AM, Todd Vainisi <[hidden email]> wrote:
>
> Hi List,
>
> Long time no lasso talk!  I have an old cent os 5 server that has lasso 8.1 on it .  Something constantly happens to push the Lasso8Service to many gigs of memory until the sites all crash.  I ssh in and issue lasso8ctl restart and the problem goes away.  It used to take weeks between restarts, but now it is usually just a day or two, sometimes even less.
>
> I’ve tried to write a shell script to execute from cron to just automatically restart lasso twice a day.  I can run this script from the command line and it executes perfectly.  But from cron, not so much.  The output from the script seems correct (it shows it has a good $PATH and I get output that says "Restarting Lasso Service: Done”), but my sites all crash as a result.
>
> Any ideas why it doesn’t work from cron?
>
> Here is the sh script (real complicated):
>
> #!/bin/bash
>
> export PATH="$PATH:/usr/sbin"
> echo $PATH
> lasso8ctl restart
>
> ******************
> and the output (emailed to me by cron):
>
> /usr/bin:/bin:/usr/sbin
> Restarting Lasso Service: Done
>
> Todd Vainisi
>
>
>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: help me keep my ancient server alive?

Todd Vainisi-2
In reply to this post by Todd Vainisi-2
Hi Steve!

I ssh into the server as the root user, so I assumed that meant that crontab -e would edit the root user’s crontab, which is where I call the script.  That is also the same user that I use to issue "lasso8ctl restart” from the command line and it works there.  Sort of weird that it gives the “Done” message in cron output if there were errors.  I suppose it doesn’t say “success”, haha.

Aside from crontab, the endless memory escalation (leak) has existed for about a decade and has nothing to do with my server specs (there is way more processor, ram, and hd space than any of the processes on this server should need) that I know of.  I believe it’s been suggested that I am re-defining some custom tags on some pages and instead of unloading the old tags, more memory is used each time the page is loaded until lasso crashes.

I’m really not interested in finding the root cause, just how to restart lasso in an automated fashion a couple times a day.  Also, I misspoke/mistyped earlier - this is lasso 8.6, not 8.1.


Message: 9
Date: Sun,  1 Jul 2018 10:55:25 -0700
From: Steve Piercy - Website Builder <[hidden email]>
To: [hidden email]
Subject: Re: help me keep my ancient server alive?
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset=UTF-8; format=flowed

Aside from the cron job...

Lack of disk space?

Massive log or sqlite files?

As far as the cron job, does it run as root?

--steve


On 7/1/18 at 10:32 AM, [hidden email] (Todd
Vainisi) pronounced:

> Hi List,
>
> Long time no lasso talk!  I have an old cent os 5 server that
> has lasso 8.1 on it .  Something constantly happens to push the
> Lasso8Service to many gigs of memory until the sites all
> crash.  I ssh in and issue lasso8ctl restart and the problem
> goes away.  It used to take weeks between restarts, but now it
> is usually just a day or two, sometimes even less.
> I?ve tried to write a shell script to execute from cron to
> just automatically restart lasso twice a day.  I can run this
> script from the command line and it executes perfectly.  But
> from cron, not so much.  The output from the script seems
> correct (it shows it has a good $PATH and I get output that
> says "Restarting Lasso Service: Done?), but my sites all
> crash as a result.
>
> Any ideas why it doesn?t work from cron?
>
> Here is the sh script (real complicated):
>
> #!/bin/bash
>
> export PATH="$PATH:/usr/sbin"
> echo $PATH
> lasso8ctl restart
>
> ******************
> and the output (emailed to me by cron):
>
> /usr/bin:/bin:/usr/sbin
> Restarting Lasso Service: Done
>
> Todd Vainisi

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: help me keep my ancient server alive?

Mark J. Reed
Cron jobs do not generally get the benefit of any startup customization in
your shell startup files (/etc/bashrc, ~root/.bashrc, ~root/.bash_profile,
/etc/profile, ~root/.profile), so there are any number of environmental
differences besides $PATH that could be the culprit. The first thing I
would check is your ulimits (ulimit -a); if the process is running out of
some resource, then it'll do that faster if the limit is lower. Run ulimit
-a while logged in and then have cron job run it into a file and see if
there's a difference. You can then set the appropriate limit in the cron
script before running the restart.

On Mon, Jul 2, 2018 at 7:20 AM, Todd Vainisi <[hidden email]>
wrote:

> Hi Steve!
>
> I ssh into the server as the root user, so I assumed that meant that
> crontab -e would edit the root user’s crontab, which is where I call the
> script.  That is also the same user that I use to issue "lasso8ctl restart”
> from the command line and it works there.  Sort of weird that it gives the
> “Done” message in cron output if there were errors.  I suppose it doesn’t
> say “success”, haha.
>
> Aside from crontab, the endless memory escalation (leak) has existed for
> about a decade and has nothing to do with my server specs (there is way
> more processor, ram, and hd space than any of the processes on this server
> should need) that I know of.  I believe it’s been suggested that I am
> re-defining some custom tags on some pages and instead of unloading the old
> tags, more memory is used each time the page is loaded until lasso crashes.
>
> I’m really not interested in finding the root cause, just how to restart
> lasso in an automated fashion a couple times a day.  Also, I
> misspoke/mistyped earlier - this is lasso 8.6, not 8.1.
>
>
> Message: 9
> Date: Sun,  1 Jul 2018 10:55:25 -0700
> From: Steve Piercy - Website Builder <[hidden email]>
> To: [hidden email]
> Subject: Re: help me keep my ancient server alive?
> Message-ID:
>         <[hidden email]>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Aside from the cron job...
>
> Lack of disk space?
>
> Massive log or sqlite files?
>
> As far as the cron job, does it run as root?
>
> --steve
>
>
> On 7/1/18 at 10:32 AM, [hidden email] (Todd
> Vainisi) pronounced:
>
> > Hi List,
> >
> > Long time no lasso talk!  I have an old cent os 5 server that
> > has lasso 8.1 on it .  Something constantly happens to push the
> > Lasso8Service to many gigs of memory until the sites all
> > crash.  I ssh in and issue lasso8ctl restart and the problem
> > goes away.  It used to take weeks between restarts, but now it
> > is usually just a day or two, sometimes even less.
> > I?ve tried to write a shell script to execute from cron to
> > just automatically restart lasso twice a day.  I can run this
> > script from the command line and it executes perfectly.  But
> > from cron, not so much.  The output from the script seems
> > correct (it shows it has a good $PATH and I get output that
> > says "Restarting Lasso Service: Done?), but my sites all
> > crash as a result.
> >
> > Any ideas why it doesn?t work from cron?
> >
> > Here is the sh script (real complicated):
> >
> > #!/bin/bash
> >
> > export PATH="$PATH:/usr/sbin"
> > echo $PATH
> > lasso8ctl restart
> >
> > ******************
> > and the output (emailed to me by cron):
> >
> > /usr/bin:/bin:/usr/sbin
> > Restarting Lasso Service: Done
> >
> > Todd Vainisi
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>



--
Mark J. Reed <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Re: help me keep my ancient server alive?

stevepiercy
In reply to this post by Todd Vainisi-2
 
 

 
 Hi Todd,  

 
In addition to what other folks have said about cron and root (I would choose Marc Pope's simple command suggestion but 'lasso8ctl resart' only), check Lasso log files and Lasso SQLite database file sizes. If you don't use a log roller or have lots of error logging, those files can get swole and go all HULK SMASH when Lasso tries to read or write to them.
 

 
Definitely a good idea to load custom types and methods at startup only, instead of each request.
 

 
--steve
 
 

 
 
 
 
 
>  
> On Jul 2, 2018 at 4:20 AM,  <Todd Vainisi>  wrote:
>  
>  
>  Hi Steve! I ssh into the server as the root user, so I assumed that meant that crontab -e would edit the root user’s crontab, which is where I call the script. That is also the same user that I use to issue "lasso8ctl restart” from the command line and it works there. Sort of weird that it gives the “Done” message in cron output if there were errors. I suppose it doesn’t say “success”, haha. Aside from crontab, the endless memory escalation (leak) has existed for about a decade and has nothing to do with my server specs (there is way more processor, ram, and hd space than any of the processes on this server should need) that I know of. I believe it’s been suggested that I am re-defining some custom tags on some pages and instead of unloading the old tags, more memory is used each time the page is loaded until lasso crashes. I’m really not interested in finding the root cause, just how to restart lasso in an automated fashion a couple times a day. Also, I misspoke/mistyped earlier - this is lasso 8.6, not 8.1. Message: 9 Date: Sun, 1 Jul 2018 10:55:25 -0700 From: Steve Piercy - Website Builder To: [hidden email] Subject: Re: help me keep my ancient server alive? Message-ID: Content-Type: text/plain; charset=UTF-8; format=flowed Aside from the cron job... Lack of disk space? Massive log or sqlite files? As far as the cron job, does it run as root? --steve On 7/1/18 at 10:32 AM, [hidden email] (Todd Vainisi) pronounced:  >  Hi List,  >   >  Long time no lasso talk! I have an old cent os 5 server that  >  has lasso 8.1 on it . Something constantly happens to push the  >  Lasso8Service to many gigs of memory until the sites all  >  crash. I ssh in and issue lasso8ctl restart and the problem  >  goes away. It used to take weeks between restarts, but now it  >  is usually just a day or two, sometimes even less.  >  I?ve tried to write a shell script to execute from cron to  >  just automatically restart lasso twice a day. I can run this  >  script from the command line and it executes perfectly. But  >  from cron, not so much. The output from the script seems  >  correct (it shows it has a good $PATH and I get output that  >  says "Restarting Lasso Service: Done?), but my sites all  >  crash as a result.  >   >  Any ideas why it doesn?t work from cron?  >   >  Here is the sh script (real complicated):  >   >  #!/bin/bash  >   >  export PATH="$PATH:/usr/sbin"  >  echo $PATH  >  lasso8ctl restart  >   >  ******************  >  and the output (emailed to me by cron):  >   >  /usr/bin:/bin:/usr/sbin  >  Restarting Lasso Service: Done  >   >  Todd Vainisi ############################################################# This message is sent to you because you are subscribed to the mailing list Lasso [hidden email] Official list archives available at http://www.lassotalk.com To unsubscribe, E-mail to: Send administrative queries to  
>  
     

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: help me keep my ancient server alive?

Wade Maxfield
In reply to this post by Todd Vainisi-2
> On 2/07/2018, at 23:20, Todd Vainisi <[hidden email]> wrote:
>
> I ssh into the server as the root user, so I assumed that meant that crontab -e would edit the root user’s crontab, which is where I call the script.  That is also the same user that I use to issue "lasso8ctl restart” from the command line and it works there.  Sort of weird that it gives the “Done” message in cron output if there were errors.  I suppose it doesn’t say “success”, haha.

Have you added a mailto to your crontab file?

If not place this at the top of the crontab before any other entries (easier to find that way)

MAILTO=“[hidden email]"
MAILFROM=“[hidden email]

then you’ll get output from cron sent to you, including errors.

 - Wade




#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>