2

When making any kind of POST to the back-end of my craft install, the server will essentially hang for a significant delay each time. I have researched related issues and have disabled all plugins without any change in performance.

Normal page GET requests are speedy, it is simply an issue of trying to post a change to a page or entry or category.

I can say that this craft install is fairly built up. There are several sections, matrices, fields, categories, etc.

The delays are significant, around 200s or more. Below is a sample of my profiler output when making a simple entry save:

Time:   297.89855s

pages:554 Memory: 20,753Kb

pages:555 Total Queries: 13

pages:556  count   total   average    min      max   
pages:558      1  0.00083  0.00083  0.00083  0.00083    system.db.CDbCommand.query(SELECT `elements`.`id`, `elements`.`type`, `elements`.`enabled`, `elements`.`archived`, `elements`.`dateCreated`, `elements`.`dateUpdated`, `elements_i18n`.`slug`, `elements_i18n`.`uri`, `elements_i18n`.`enabled` AS `localeEnabled`, `content`.`id` AS `contentId`, `content`.`field_body`, `content`.`field_caption`, `content`.`field_dateEnd`, `content`.`field_dateStart`, `content`.`field_heading`, `content`.`field_pageTitle`, `content`.`field_position`, `content`.`field_urlOverride`, `globalsets`.`name`, `globalsets`.`handle`, `globalsets`.`fieldLayoutId`
FROM `craft_elements` `elements`
JOIN `craft_elements_i18n` `elements_i18n` ON elements_i18n.elementId = elements.id
JOIN `craft_content` `content` ON content.elementId = elements.id
JOIN `craft_globalsets` `globalsets` ON globalsets.id = elements.id
WHERE ((((elements_i18n.locale = :locale) AND (content.locale = :locale)) AND (elements.archived = 0)) AND (elements.enabled = 1)) AND (elements_i18n.enabled = 1)
GROUP BY `elements`.`id`
ORDER BY `name` LIMIT 100. Bound with :locale='en_us')
pages:559      1  0.00079  0.00079  0.00079  0.00079    system.db.CDbCommand.query(SELECT *
FROM `craft_tasks`
WHERE (lft = 1) AND (status = :status). Bound with :status='running')
pages:560      1  0.00062  0.00062  0.00062  0.00062    system.db.CDbCommand.query(SHOW TABLES LIKE 'craft_%')
pages:561      1  0.00047  0.00047  0.00047  0.00047    system.db.CDbCommand.query(SELECT count(`id`)
FROM `craft_tasks`
WHERE (lft = 1) AND (status = :status). Bound with :status='pending')
pages:562      1  0.00022  0.00022  0.00022  0.00022    system.db.CDbCommand.query(SELECT *
FROM `craft_info` LIMIT 1)
pages:563      1  0.00019  0.00019  0.00019  0.00019    system.db.CDbCommand.query(SELECT *
FROM `craft_users`
WHERE id=:id. Bound with :id='1')
pages:564      1  0.00015  0.00015  0.00015  0.00015    system.db.CDbCommand.query(SELECT `id`, `groupId`, `name`, `handle`, `context`, `instructions`, `translatable`, `type`, `settings`
FROM `craft_fields`
WHERE context = :context
ORDER BY `name`. Bound with :context='global')
pages:565      1  0.00014  0.00014  0.00014  0.00014    system.db.CDbCommand.query(SELECT `sections`.`id`, `sections`.`structureId`, `sections`.`name`, `sections`.`handle`, `sections`.`type`, `sections`.`hasUrls`, `sections`.`template`, `sections`.`enableVersioning`, `structures`.`maxLevels`
FROM `craft_sections` `sections`
LEFT JOIN `craft_structures` `structures` ON structures.id = sections.structureId
ORDER BY `name`)
pages:566      1  0.00011  0.00011  0.00011  0.00011    system.db.CDbCommand.query(SELECT `id`
FROM `craft_assetsources`)
pages:567      1  0.00011  0.00011  0.00011  0.00011    system.db.CDbCommand.query(SELECT `id`, `class`, `version`, `settings`, `installDate`
FROM `craft_plugins`
WHERE enabled=1)
pages:568      1  0.00010  0.00010  0.00010  0.00010    system.db.CDbCommand.query(SELECT `id`
FROM `craft_categorygroups`)
pages:569      1  0.00009  0.00009  0.00009  0.00009    system.db.CDbCommand.query(SELECT `locale`
FROM `craft_locales`
ORDER BY `sortOrder`)
pages:570      1  0.00008  0.00008  0.00008  0.00008    system.db.CDbCommand.query(SELECT `id`
FROM `craft_globalsets`)

At this point I'm looking for some possible directions solve the issue. I know these issues are tedious and difficult, but I'm willing to take shots in the dark out of desperation!

2

It doesn't look like MySQL is the issue from the database profiling info you posted.

If you enable devMode, reproduce the issue, then look at your craft/storage/runtime/logs/craft.log folder and find the last request, you can see the code profiling/tracing information. See if you can find out where the 200 second delay is coming from that information.

| improve this answer | |
  • So I got your reply at work with the same laptop that gave me issues. I loaded the page and did a test. The page submitted immediately without problem. I came back to try again tonight and I still have the same issue. Now I'm thinking this has got to be some network issue. I just went through a VPN and the issue seems to be resolved. If I come off the VPN it comes back. I'll continue to investigate and try to leave an explanation if it has anything remotely to do with Craft, but I'm afraid at this point it doesn't. – Michael Thomas Jan 26 '15 at 3:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.