Timeout when saving permissions in Drupal

Posted on 2011-10-23
Last Modified: 2012-08-13
Have been working on a test version of a drupal site for some time now.
Suddenly I find I cannot save permissions. When I click on the Save Permissions button on the Permissions page after a long delayI get a timeout error.
Can anyone suggest a reason?  It has never happened before.
Question by:bogorman
    LVL 17

    Expert Comment

    Have you added any new modules or themes shortly before this happened?

    Author Comment

    No, I haven't.  I did however have problems with CKeditor and CKFinder.    CKFinder worked previously but I suddently found the Browse Server button disappeared. After deleting the CKEditor folder (containing CKFinder) and uploading my last backup I got it to work.
    I think the Save Permissions problem occurred about this time but I have not installed any new modules or themes for some time.
    I did read that it could be a memory problem and I should try increasing the value in ini_set("memory_limit", "128M"); in settings.php, though it is I think fairly high at present at 128M.
    Would value your further comments and suggestions.

    Author Comment

    Have tried increasing the memory limit setting in my settings.php file from 128M to:

    ini_set("memory_limit", "256M");

    It seems to have done the trick and the page saves quickly now. However would value you advice on whether it is ok to increase to this figure.   The site is on a Windows server (IIS) - don't know whether that is relevant.

    LVL 17

    Expert Comment

    That should be fine, especially because you were able to increase it. On shared hosting, you might not have been allowed to have that much. You must be onDrupal 7? It needs a minimum of 128, and contributed modules need more.

    Author Comment

    When I tried saving the permissions again I found that the old problem had returned. Although the page saved previously, if I now click on Save Permissions without making any changes to the page it still times out with "the server at .......... is taking too long to respond"
    However, I then tried increasing max_execution_time to 30 and the save worked.   In case this is an intermittent problem, will continue to try it.
    LVL 17

    Expert Comment

    Have you done any updates and then have not run the database update script that went with the update?

    Author Comment

    Yes I usually run update.php.  It is POSSIBLE that I neglected to do this on one occasion but I don't think so.
    LVL 17

    Expert Comment

    Have you tried ways of speeding up the site, like using the Boost module?

    Author Comment

    Thanks for the suggestion.  Will take me a while to install and adjust all the settings.
    Will come back to you as soon as I have (hopefully!) got it working

    Author Comment

    Have installed Boost and I get no errors.

    If I'm logged in as admin and I then logout I am not conscious of a dramatic increase in speed - perhaps I'm expecting too much!

    Would you mind looking at the site? -

    I suppose it won't help very much as you do not know what it was like before.  There is certainly a large amount of very clear documentation, so I will continue to study it and get back to you.

    Author Comment

    I think there is an improvement in speed but not all that much.
    I cannot set Optimize CSS as this seems to redefine the custom css file. They do warn you that "this setting can interfere with theme development.....".  I am not quite sure what this means as I am no longer altering the theme I use. Presumably I could try this when the site is ready.
    I wonder if there are any other settings I can tweak?  If there is anyway of emailing you the admin password you can look at the settings.
    LVL 17

    Expert Comment

    Check this out -
    although I am not sure how applies to D7.
    I went to a talk like this at the Boston Drupal group, and can't find my notes on it.

    Author Comment

    Thanks for the link. Have looked at it and run the videos.
    As far as I can see I have installed boost correctly. I am waiting for the hoisters to tell me if gzip is installed on the site but apart from that there is not much else I can do.
    Most of the pages just consist of one image and text plus the "banner" image which is present on all pages. Am wonder if that could be slowing things down but boost should have coped with that as it creates html pages which are used in place of the normal drupal "pages" (?).

    Can you make any other suggestions. Would really like to get it working correctly.
    LVL 17

    Accepted Solution

    What are the cache setting you are using? If you are not changing content on a regular basis, you could cache the pages for a longer time. Go to Configuration->Performance and see what your cache and bandwidth optimization setting are.

    Author Comment

    Here are my settings:


    Performance Tab:

    Minimum Cache Lifetime: None
    Gzip page: Enabled (Gzip is not installed on the server – should I disable this?)
    Block Cache: Enabled
    Optimize CSS files: Disabled.  Have had to do this as Boost appears to recreate my Theme's CSS file but it doesn't include the banner image in the css:
          My CSS:    #header-inner
                height: 133px;
                background-image:url('Infant Stars in Nearby Galaxy with wavy logo2.jpg');
          Boost's CSS:header-inner
                height: 133px;

    Boost Settings tab:

    Static Page Cache:  Enabled
    Gzip page: Enabled
    Boost – HTML – Default max cache lifetime: 12 hours
    Boost – XML – Default max cache lifetime: 1 hour
    Boost -  JSON Default max cache lifetime : 1 hour

    (the buttons here show: Boost cached data 143 pages
                         Clear boost expired data: 61 pages)
    Boost cacheability settings:
    Cache pages that contan URL Variables: Selected
    Cache html documents/pages: Selected
    Cache .xml and /feed: Not Selected
    Cache ajax/json: Selected
    Cache .css: Selected
    Cache .js: Selected
    Only allow ASCII characters in path: Selected
    Do not cache if php error on page: Not Selected
    Do not cache if a message is on the page: Selected
    Do not cache if there is an alias for this URL: Not Selected
    Statically cache specific pages:
    Cache every page except the listed pages: Selected (no pages listed)
    Clear expired pages on cron runs:  Enabled
    Check database timestamps......Not Selected
    Clear all empty folder from cache: not Selected
    Clear the fronpage cache when prompted: Selected
    Clear all cached pages referenced via CCK...... Selected
    Clear all cached terms....... Selected
    Clear all cached pages in a menu on an insert/update/delete operation:
    Clear all cached views pages associated with a node on update/delete....Selected
    Cleared all cched views pages associated with a note on insert..........Selected
    Clear Boosts cache.... Not Selected
    Flush all sites caches in this database (not Selected)
    Expire content in DB..... Not Selected
    Ignore cache flushing:
          only Ignore Clear Entire Cache..... Selected
    Cache Dir:  cache
    Do not store the cache file path in the database   Selected
    Pre-process function: blank
    Aggressive setting of the boost cookie:   Selecgted
    Asynchronous Operation: output HTML.........    Selected
    Overwrite the cached file.........Not Selected
    Turn off clean urls for logged in users     Not Selected
    Aggressive Gzip...........Selected
    Disable warning about reaching the ext3 fie system......Selected

    Boost crawler:
    Enable the cron crawler:    Not selected
    Not not flush:    Not selected
    Preemptive Cache HTML    Selected
    Preemptive Cache XML      Selected
    Preemptive Cache AJAX/JSON..........Selected
    Crawl all URL's...... Not Selected
    Number of URLs to grab.... 10000
    Crawler Throttle   0
    Crawler Batch Size     10
    Number of Threads 2
    Servers URL or Name:
    %{SERVER_NAME}    Seleced
    %{Document_root}     Selected
    Etag Settings
    Do nothing:    Selected
    Boost tags
    Inject boost tags......Selected
    Follow RFC2616.....Selected
    Ignore .htaccess warning........Not selected
    On the Clear Boost's Database and File Cache button there are 371 Database Records and 352 Files shown.


    Author Closing Comment

    Thanks for trying to help.  Unfortunately I find Boost really makes not difference on my site but you have spent so much time on it I think it is fair to assign the points.
    I am wondering if it is something to do with the server I am using - Windows IIS7.
    Am thinking of trying a hosted who has LINUX servers. Is this better for drupal?

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    RTL (right to left) web applications aiming for audiences speaking languages like Hebrew or Arabic, are generally more complicated than the same applications aiming for audiences speaking Latin based languages. The main difference lies of course …
    This script checks a path to see if a folder exists. If the folder does exist you will get output "The folder has previously been created. No action taken" If not it will create the folder. Then adds one user modify permission to the folder. It …
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now