1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

large Core file - What is the reason & can I delete?

Discussion in 'Plesk for Linux - 8.x and Older' started by kuhle, Oct 24, 2008.

  1. kuhle

    kuhle Guest

    0
     
    I have one domain which is creating ENORMOUS (100-500MB) files in httpdocs. It creates a number of them each day! It has only started in the last 2 weeks.

    the files are called core.19521 (the numbers are different on each file, and under the file Type, it says 19521 file (or whatever the corresponding number is in the filename). Looking at today, for example, all but 2 were created between 0215 hrs and 0244 hrs - 32 files in total, with total size being >12GB.

    Any idea how I can find out what is causing those files to be created?

    Can I safely delete them, and prevent any more from being created?

    Thanks in advance for any help.
     
  2. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    Youd look at them with gdb, example:

    gdb /usr/sbin/httpd core.12345

    This is assuming they're from apache of course. Look for a setting in your configs like this:
    CoreDumpDirectory <PATH>
     
  3. kuhle

    kuhle Guest

    0
     
    Thanks for the reply. Just had to delete hundreds of files that added up to about 170GB of data! Ridiculous!

    I tried what you suggested, but with no real success:

    -bash-2.05b# gdb /usr/sbin/httpd core.4917
    GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found)...Using host libthread_db library "/lib/tls/libthread_db.so.1".

    /root/core.4917: No such file or directory.

    (gdb) quit
    -bash-2.05b# gdb /home/httpd/vhosts/domain.com/httpdocs core.4917
    GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "i386-redhat-linux-gnu".../home/httpd/vhosts/domain.com/httpdocs: No such file or directory.

    /root/core.4917: No such file or directory.

    I also looked at httpd.include and vhost.conf for that domain and neither of those mention a CoreDumpDirectory. This is only happening on one domain.

    Then I looked at one of the small files, and while most of it was in binary, there were occasional words interspersed, and some of them are below. Is there any clue there as to what might be causing the problem? Does it point at the domain rather than the server doing this?

    They have been deleting a lot of old video files (they are an internet TV company). Could it be that something they have done has initiated this.

    Grateful if anybody could help more with this. I am trying to migrate all the domains from this server to a new one, but problems like this could affect the whole migration.
     
  4. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    wrong syntax, you want:

    gdb <application> <path to core>


    example:

    gdb /usr/sbin/httpd /path/to/core.1234
     
  5. kuhle

    kuhle Guest

    0
     
    CoreDumpDirectory does not exist

    Apache went down. Will not restart from Plesk CP:

    Unable to make action: Unable to manage service by websrvmng: websrvmng: Service /etc/init.d/httpd failed to start

    0: /usr/local/psa/admin/plib/common_func.php3:155
    psaerror(string 'Unable to make action: Unable to manage service by websrvmng: websrvmng: Service /etc/init.d/httpd failed to start')
    1: /usr/local/psa/admin/htdocs/server/restart_services.php:28


    From SSH Root login:

    -bash-2.05b# /etc/init.d/httpd start
    Starting httpd: Syntax error on line 1 of /etc/httpd/conf.d/debug.conf:
    CoreDumpDirectory /tmp/apache2-gdb-dump does not exist
    [FAILED]
    -bash-2.05b#

    I guess I simply need to create that file (in UTF-8???) and upload it to that folder? I will try anyway, but hope someone can help.
     
  6. kuhle

    kuhle Guest

    0
     
    I think I fixed it by doing this:

    and then restarted Apache and it is working.

    Not sure how or why the directory disappeared in the first place, but it meant that when Apache stopped, it could not automatically restart.

    Is this linked to the huge core files that were being created on the client's domain possibly?
     
  7. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    yup, thats the directive I was talking about (probably from our wiki too)
     
  8. kuhle

    kuhle Guest

    0
     
    The core files are still being created randomly in the customers /home/httpd/vhosts/domain.com/httpdocs directory.

    Today instead of being approx 400MB each, they are now around 70MB each.

    There are no files in the apache2-gdb-dump folder that I created.

    I ran the command you gave me and got the following:

    .4917-2.05b# gdb /usr/sbin/httpd /home/httpd/vhosts/domain.com/httpdocs/core
    GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found)...Using host libthread_db library "/lib/tls/libthread_db.so.1".

    Core was generated by `/usr/sbin/httpd'.
    Program terminated with signal 11, Segmentation fault.
    #0 0x007680dc in ?? ()
    (gdb) quit
    -bash-2.05b#

    Should the above give me any indication of what to do next.
     
  9. kuhle

    kuhle Guest

    0
     
    The files are back up to being 400-500 MB in size!!! There is absolutely no pattern to when they are created, nor when, but each day they clog up the server with about 30-70GB of data which is ridiculous, and they have to be manually deleted.

    Any help that atomicrocket or anyone else can give as to what might be causing this would be greatly appreciated.
     
  10. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    Maybe someone set it up to do that in a .htaccess file?
     
  11. kuhle

    kuhle Guest

    0
     
    I have looked in the .htaccess file at /home/httpd/vhosts/domain.com/httpdocs

    Does that give any clue as to what is causing these files to be created? Today it created 278 files!! You can only begin to imagine the problems I am having with it guzzling disc space! I really want to complete the migration to the new server, but still have some questions on that.

    Thanks for advice so far.
     
Loading...