Daemon perl script

Discussion in 'Perl Misc' started by janicehwang1325@yahoo.com, Jun 13, 2006.

  1. Guest

    hi expert,

    I have a client program which is running as daemon and send data to the
    server program on the remote site. I m in the testing phase. however,
    after running the program for 3 days, suddenly the client program is
    killed and no longer active in the client site. wat can be the reason
    for this? Is setting scheduling priority using 'renice' can solve the
    problem?
    Appreciate lots if anyone try to give me some idea.
     
    , Jun 13, 2006
    #1
    1. Advertising

  2. wrote:

    > I have a client program which is running as daemon and send data to the
    > server program on the remote site. I m in the testing phase.


    Traditionally, the server program would be described as the 'listening'
    deamon, not the client. The client is typically a program that builds
    up a connection with the deamon and quits after it's done.

    > after running the program for 3 days, suddenly the client program is
    > killed and no longer active in the client site. wat can be the reason
    > for this?


    It's unlikely that the server software is authorized to kill processes
    at the client. I think you should look for a mechanism at the client
    side that is responsible for the kill:
    - timeout settings (OS-level, Apache/CGI level, Perl level, CPU
    (re)nice-level...)
    - client's internal error handling (program, socket, used modules,...)
    - this may sound too trivial, but maybe there was a reboot or restart
    of some software

    I would counsel to investigate the logs as much as possible to see what
    happened at kill time. I'm thinking an "unexpected condition" occured
    which made the client software decide to quit.

    > Is setting scheduling priority using 'renice' can solve the
    > problem?


    I would say normally not (though it wouldn't hurt to keep a friendly
    CPU). But AFAIK such things don't kill processes unless you explicitly
    allow them to do so under certain conditions.

    Hope this helps,

    --
    Bart
     
    Bart Van der Donck, Jun 13, 2006
    #2
    1. Advertising

  3. farans Guest

    On Mon, 12 Jun 2006 18:27:23 -0700, wrote:

    > hi expert,
    >
    > I have a client program which is running as daemon and send data to the
    > server program on the remote site. I m in the testing phase. however,
    > after running the program for 3 days, suddenly the client program is
    > killed and no longer active in the client site. wat can be the reason
    > for this? Is setting scheduling priority using 'renice' can solve the
    > problem?
    > Appreciate lots if anyone try to give me some idea.


    I don't have an answer for you, only a question:

    What were your daemons "last words"?
     
    farans, Jun 13, 2006
    #3
  4. Guest

    "" <> wrote:
    > hi expert,
    >
    > I have a client program which is running as daemon and send data to the
    > server program on the remote site. I m in the testing phase. however,
    > after running the program for 3 days, suddenly the client program is
    > killed and no longer active in the client site. wat can be the reason
    > for this?


    There are many. Out of memory, machine reboot, untrapped signal, seg
    fault, a perl "die" or "exit" statement was executed, etc. Does your
    daemon keep a log file? Does it use it? Have you looked at it?

    > Is setting scheduling priority using 'renice' can solve the
    > problem?


    If the problem is that someone said "What the heck is the program doing
    taking all my CPU time?" and then went and killed it (Either because they
    are the same user as is running the daemon, or because they have access to
    root), then renicing it might solve the problem. Otherwise, it probably
    won't.

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , Jun 13, 2006
    #4
  5. Guest

    thanks all for the comments. it's really helpful to me. actually after
    renicing the program, the program do run without any "killing".
    however, my supervisor is changing his mind and the progarm is now
    changed. I have another problem occur n will post in another message
    later. Pls feel free to have a look
     
    , Jun 14, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    1,803
  2. Jean-Paul Calderone
    Replies:
    0
    Views:
    456
    Jean-Paul Calderone
    Mar 20, 2009
  3. Floris Bruynooghe
    Replies:
    1
    Views:
    452
    Floris Bruynooghe
    Mar 24, 2009
  4. Grischa Schuering
    Replies:
    1
    Views:
    524
    David Efflandt
    Sep 30, 2003
  5. Daemon Win32::Daemon;

    , Sep 7, 2006, in forum: Perl Misc
    Replies:
    0
    Views:
    255
Loading...

Share This Page