ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Timeout in Several Parts

December 04, 2008 8:51am

Subscribe [5]
  • #1 / Dec 04, 2008 8:51am

    FaithX

    120 posts

    I have version 1.6.6 installed, but these problems remain since 1.6.0.

    I am using lots of caching, because of the bad design I had to do before embedded templates was introduced. I should really redesign the whole structure using these technique, but I don’t have time.

    So I have 14 we, many relational fields. 3300 blog entries at all. But as I use tag caching, I used to have over 10.000 folders in system/cache/tag_cache!!! I figured out that my pages go better if I purge the cash periodically. This must be done by an FTP commander, because the script ends with timeout. So first I delete the folders, with the files, then i purge the cache from EE CP. Then everything works fine.

    But after a while. For example now: I have only 150 directories here in tag_cache. 100 in page cache and none in others.

    The problems:
    - timeout - when editing a comment
    - timeout - when editing a template
    - timeout - when editing custom field
    and si

    In all cases, the update is done correctly, but something is happening afterwards, so the page ends with timeout. I am sure, that this must have something with tag caching, because after purge, everything works fine!

    Please, take a look on that.

  • #2 / Dec 04, 2008 10:07am

    Robin Sowell

    13255 posts

    I’m going to shift up to ‘Tech Support’ for now, because I’m not spotting anything that looks like a bug at this point.  We’ll want to either replicate on another install, spot a php error, something like that- as well as eliminate plugins, server issues, etc. before we conclude a system bug.

    Let us know if you have any extensions installed, what your php memory is, whether the cp in general seems slow or any particular pages.  Can you clear cache via ‘Admin- Utilities’ at all?  Even w/just a few in there?  If not, it suggests permissions may be interfering w/tag caching, which could be the source of some of these issues.

  • #3 / Dec 04, 2008 10:30am

    FaithX

    120 posts

    I had tested this in a linux virtual machine also. Where I did removed all the plugins, and extensions. It’s definitely in core EE.

  • #4 / Dec 04, 2008 11:13am

    Sue Crocker

    26054 posts

    FaithX, how much memory is allocated to EE? Robin also asked a few more specific questions.

    Let us know if you have any extensions installed, what your php memory is, whether the cp in general seems slow or any particular pages.  Can you clear cache via ‘Admin- Utilities’ at all?  Even w/just a few in there?  If not, it suggests permissions may be interfering w/tag caching, which could be the source of some of these issues.

  • #5 / Dec 04, 2008 11:48am

    FaithX

    120 posts

    It’s a shared hosting. I did my virtual based on that. But I could not ask the provider to increase the values.

    Database Version 5.0.22
    Database Records 87218
    Database Size 60.5 MB

    Directive Local Value Master Value
    allow_call_time_pass_reference On On
    allow_url_fopen On On
    always_populate_raw_post_data Off Off
    arg_separator.input & &
    arg_separator.output & &
    asp_tags Off Off
    auto_append_file no value no value
    auto_globals_jit On On
    auto_prepend_file no value no value
    browscap /etc/php.ini.browscap /etc/php.ini.browscap
    default_charset no value no value
    default_mimetype text/html text/html
    define_syslog_variables Off Off
    disable_classes no value no value
    disable_functions exec, system, pXhpinfo, passthru, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate,shell_exec,popen,dl exec, system, pXhpinfo, passthru, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate,shell_exec,popen,dl
    display_errors On On
    display_startup_errors Off Off
    doc_root no value no value
    docref_ext no value no value
    docref_root no value no value
    enable_dl Off Off
    error_append_string no value no value
    error_log /var/log/php-error.log /var/log/php-error.log
    error_prepend_string no value no value
    error_reporting 2047 2039
    expose_php Off Off
    extension_dir ./ ./
    file_uploads On On
    highlight.bg #FFFFFF #FFFFFF
    highlight.comment #FF8000 #FF8000
    highlight.default #0000BB #0000BB
    highlight.html #000000 #000000
    highlight.keyword #007700 #007700
    highlight.string #DD0000 #DD0000
    html_errors On On
    ignore_repeated_errors Off Off
    ignore_repeated_source Off Off
    ignore_user_abort Off Off
    implicit_flush Off Off
    include_path .:/usr/local/apache2/lib/php .:/usr/local/apache2/lib/php
    log_errors On On
    log_errors_max_len 1024 1024
    magic_quotes_gpc Off Off
    magic_quotes_runtime Off Off
    magic_quotes_sybase Off Off
    mail.force_extra_parameters no value no value
    max_execution_time 5 5
    max_input_time 60 60
    open_basedir ************
    output_buffering no value no value
    output_handler no value no value
    post_max_size 8M 8M
    precision 12 12
    realpath_cache_size 16K 16K
    realpath_cache_ttl 120 120
    register_argc_argv On On
    register_globals On On
    register_long_arrays On On
    report_memleaks On On
    report_zend_debug On On
    safe_mode On On
    safe_mode_exec_dir no value no value
    safe_mode_gid Off Off
    safe_mode_include_dir no value no value
    sendmail_from no value no value
    sendmail_path ******************* 
    serialize_precision 100 100
    short_open_tag On On
    SMTP localhost localhost
    smtp_port 25 25
    sql.safe_mode Off Off
    track_errors Off Off
    unserialize_callback_func no value no value
    upload_max_filesize 2M 2M
    upload_tmp_dir ****************
    user_dir no value no value
    variables_order EGPCS EGPCS
    xmlrpc_error_number 0 0
    xmlrpc_errors Off Off
    y2k_compliance On On
    zend.ze1_compatibility_mode Off Off

    Apache Version Apache
    Apache API Version 20051115
    Server Administrator **************** 
    Hostname:Port ****************
    User/Group apache(81)/81
    Max Requests Per Child: 500 - Keep Alive: on - Max Per Connection: 100
    Timeouts Connection: 300 - Keep-Alive: 1
    Virtual Server Yes
    Server Root /usr/local/apache2
    Loaded Modules core mod_authn_file mod_authn_default mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_default mod_auth_basic mod_include mod_log_config mod_env mod_expires mod_headers mod_setenvif mod_ssl prefork http_core mod_mime mod_status mod_autoindex mod_suexec mod_cgi mod_negotiation mod_dir mod_actions mod_alias mod_rewrite mod_so mod_cpuusage mod_php5

    Directive Local Value Master Value
    engine 1 1
    last_modified 0 0
    xbithack 0 0


    Apache Environment
    Variable Value
    SCRIPT_URL ******************* 
    SCRIPT_URI ******************* 
    HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */* 
    HTTP_REFERER ******************* 
    HTTP_ACCEPT_LANGUAGE hu-hu
    HTTP_UA_CPU x86
    HTTP_ACCEPT_ENCODING gzip, deflate
    HTTP_IF_MODIFIED_SINCE Thu, 04 Dec 2008 15:39:38 GMT
    HTTP_USER_AGENT ******************* 
    HTTP_HOST *******************
    HTTP_CONNECTION Keep-Alive
    HTTP_COOKIE ******************* 
    PATH ******************* 
    SERVER_SIGNATURE no value
    SERVER_SOFTWARE Apache
    SERVER_NAME ******************* 
    SERVER_ADDR *******************
    SERVER_PORT 80
    REMOTE_ADDR *******************
    DOCUMENT_ROOT ******************* 
    SERVER_ADMIN ******************* 
    SCRIPT_FILENAME ******************* 
    REMOTE_PORT *******************
    GATEWAY_INTERFACE CGI/1.1
    SERVER_PROTOCOL HTTP/1.1
    REQUEST_METHOD GET
    QUERY_STRING ******************* 
    REQUEST_URI ******************* 
    SCRIPT_NAME ******************* 


    HTTP Headers Information
    HTTP Request Headers
    HTTP Request ******************* 
    Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */* 
    Referer ******************* 
    Accept-Language hu-hu
    UA-CPU x86
    Accept-Encoding gzip, deflate
    If-Modified-Since Thu, 04 Dec 2008 15:39:38 GMT
    User-Agent ******************* 
    Host *******************
    Connection Keep-Alive
    Cookie ******************* 

    BCMath support enabled

    ctype functions enabled

    CURL support enabled
    CURL Information libcurl/7.15.1 OpenSSL/0.9.7i zlib/1.2.3

    date/time support enabled
    Timezone Database Version 2005.18
    Timezone Database internal
    Default timezone Europe/Berlin

    Directive Local Value

  • #6 / Dec 04, 2008 11:49am

    FaithX

    120 posts

    Can you clear cache via ‘Admin- Utilities’ at all? Even w/just a few in there?

    Yes, definitely. It’s only a problem when there are thousands of them.

    After the purge, everything is very fast in the CP.

    I see, that there’s Safe Mode On. But I can’t do nothing with that.

  • #7 / Dec 04, 2008 1:27pm

    Derek Jones

    7561 posts

    FaithX, do you see how many of your problem descriptions end in “I can’t do anything about that”?  You can’t just blame EE because you are unable or unwilling to address your issues with hosting.

    It sounds to me like you’re over-caching, and/or the storage array cannot keep up with the activity.  With safe mode enabled, there are many file based operations that might be failing silently, and increasing i/o time.  That you’re having timeouts in the control panel, where no db caching occurs, indicates that this is most likely a server issue.

  • #8 / Dec 04, 2008 3:35pm

    FaithX

    120 posts

    In the past You’ve mentioned my DB is not so big. I think the same. It’s nothing special. It must be run easily. I think I did the site as best as I can, with the version I had at the beginning. Nobody will recode the site on every new EE version.

    But I think it is a blame, that I can’t update a comment or a custom field property. What has this with I/O and cache? I can trace it out, and I can find what can cause this slow behaviour, but I think Your target is also to make EE better.

    Let’s concentrate on one thing at this time.
    Why I can’t update a simple comment? What is happening at the background?
    I’d like to follow Your commands and recommendations, I hope I can do it.

  • #9 / Dec 04, 2008 5:35pm

    Derek Jones

    7561 posts

    I think I did the site as best as I can, with the version I had at the beginning. Nobody will recode the site on every new EE version.

    No one is asking you to recode your site every version update, that’s never been necessary, but it’s been how long now?  Two+ years and 3 major versions?  At some point you need to optimize your templates using native features of the application; it’s all we can reasonably support, and is why we add some of these features in the first place.

    I’d like to follow Your commands and recommendations, I hope I can do it.

    You’re going to need to demonstrate some willingness to do so in this regard.  In the past you have not been open to our suggestions, and we cannot allow our support staff’s time to be cannibalized from helping other users if you refuse to listen to what they say.

    You’ve mentioned my DB is not so big. I think the same. It’s nothing special. It must be run easily.

    Going back to base issue we discovered in helping you in the past, you are correct.  There’s not really anything supremely unique or large about your installation that would justify the slowness and issues you’ve had.  We narrowed it down before to being hosted on a shared host packing too many people onto a single box, and catering toward static site delivery instead of PHP/MySQL based dynamic delivery.  If you want most or all of your problems to go away, spending half a day shopping for and moving to a new host would probably do it, simple as that.  No host worth their salt will even run PHP in safe mode: it’s not safe, it cripples functionality, and demonstrates a lack of knowledge (or desire) to configure servers to be PHP-friendly without compromising security.  Safe mode is in fact even being removed from PHP, because the creators acknowledge the harm it causes (crippled capabilities and false sense of security).

    To the specific question:

    Why I can’t update a simple comment? What is happening at the background?

    Not much, really.  A couple queries to verify the comment ID and editing rights, caches are cleared, and then an update to the exp_comments table, followed by a redirect, unless you have an extension installed that uses the ‘update_comment_additional’ hook.  It sounds like your issues are stemming from the cache clearing.  Your cache files are being properly built, as you’ve verified, but it could be that directory read/write/delete functions from PHP are taking excessively long to execute, or are doing so and timing out with hidden errors.  If you open core.functions.php and find the delete_directory() method, try removing all of the @ symbols from the code (they suppress errors).  Then in cp.publish.php find the last two lines of the update_comment() method, and change them from:

    $FNS->redirect($url);
    exit;

    to:

    // $FNS->redirect($url);
    exit('done');

    Then try to update a comment, and see what the results are.  Make sure you have error reporting enabled in your Output and Debugging preferences; I see from your PHP Info above that display_errors is already enabled as necessary.

  • #10 / Dec 05, 2008 9:43am

    FaithX

    120 posts

    Thanks for the detailed info! Actually, I had to clear the cache, so the error is not appearing now. I have to wait again until it gets so many files again, then I will try You tricks.

    Thanks in advance!

  • #11 / Dec 05, 2008 11:00am

    Ingmar

    29245 posts

    Well, let us know how it goes…

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases