After upgrading to Pathauto 7.x-1.3, when users try to log into web sites, particularly if there is an after-login redirect, PHP is timing out (after 60 seconds of execution), whereas before it took less than a second to log in. Disabling the pathauto module (via drush pm-disable pathauto) corrects the problem. The only line in the error log I see is:

Maximum execution time of 60 seconds exceeded in /www/foo.com/htdocs/includes/module.inc on line 330, referer: https://foo.com/user/login?destination=node/17

That appears to be the core function module_load_include() which is called several times from within pathauto. I wonder if there's a recursive situation going on here?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tjg created an issue. See original summary.

Leeteq’s picture

Are you also using the login_destination module? Any difference if that one gets disabled instead of Pathauto?

rockclimb’s picture

I'm seeing this too. Downgrading to 7.x-1.2 has solved the problem for me, for now at least. I guess I'll have to stay on the older version for a while.

Leeteq’s picture

@rockclimb: are you also using the login_destination, or can you confirm that this issue is not related to that module?

ecvandenberg’s picture

I use both pathauto 7.x-1.3 and login_destination 7.x-1.1. And not experiencing any timeouts.

Login_destination creates a redirect to on login on all pages and on logout, with an exception for the pages user and user/*.

FishingAddict’s picture

I can confirm that I was experiencing this issue on all of my sites using SQLite as the database, after upgrading to Pathauto 7.x-1.3. I believe that it started for me after updating core to 7.40 and Pathauto to 7.x-1.3. Not even using ini_set('max_execution_time', 120); in settings.php would resolve the issue but downgrading to Pathauto 7.x-1.2 did resolve it.

All of my SQLite based sites (but not MySQL sites) were nearly un-editable and un-manageable using Pathauto 7.x-1.3. Note that the sites worked fine for anonymous visitors but logged in users (even user 1) attempting updates to site content, user password changes, or other management changes results in a long delay before the server essentially times out with a "HTTP Error 500 Internal server error". Checking the Drupal logs shows the following types of timeouts from the server for exceeding maximum PHP execution times:

...
PHP Fatal error: Maximum execution time of 30 seconds exceeded in //public_html/includes/database/select.inc on line 1506
PHP Fatal error: Maximum execution time of 30 seconds exceeded in //public_html/includes/database/database.inc on line 737
PHP Fatal error: Maximum execution time of 30 seconds exceeded in //sctcmg/public_html/includes/database/query.inc on line 0
...

What may be an important note is after the timeout occurred, I could occasionally reload the page in the browser and the update would immediately work with no timeout. Seems to be some regression with Pathauto 7.x-1.3, SQLite, and caching.

jasonflaherty’s picture

I'd just like to echo what FishingAddict ^^^ above noted. It is on Sqlite sites alone for me. 7.41 and PathAuto 7.x-1.3. When i disable this module, the site is "normal" and reacts fine to all use.

Thanks

bonked’s picture

Just chiming in - also seeing the same behavior with a clean install on a default digital ocean nginx setup - only additional module outside of core is pathauto. Reverting to 1.2 fixes it.

Works fine with MySQL - but Sqlite runs into the problem.

bobmacallan’s picture

I am experiencing the same timeout issue, however, it always happens when editing blog entries.

7.43 SQLite with Pathauto 7.x-1.3 will cause either timeouts or redirect to the create blog page when creating or editing blog entry content types. Revert to 1.2 fixes the issue.

Was able to replicate the issue on fresh 7.43 SQLite install with just Blog and Pathauto 7.x-1.3 installed. Try to create a blog entry and get a redirect to a new create blog page.

John Morahan’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
395 bytes

The problem is that rowCount() isn't meant to be used with SELECT queries. It just happens to work with MySQL.

Status: Needs review » Needs work

The last submitted patch, 11: pathauto.2582655.patch, failed testing.

John Morahan’s picture

Title: Pathauto Causes Timeouts After Update to 7.x-1.3 » Pathauto 7.x-1.3 causes timeouts with SQLite
FileSize
397 bytes
John Morahan’s picture

Status: Needs work » Needs review
Dave Reid’s picture

I'd rather just get rid of using db_select() in this case, we can simplify and speed this up by also using db_query().

John Morahan’s picture

Sure, that works too.

Zeddix’s picture

Had the same problem on my livesite. After figuring out the problem i came up with a similar solution to #15. Check the issuequeue for pathauto and found this. I then Implemented patch #15 on my live site. It does fix the problem and so far i can see no negativ side effects.

felubra’s picture

Patch #15 solved the issue for me. Had trouble editing nodes.

tjg’s picture

Any chance of getting this patch rolled into the module? #15 fixed the problem for me too.

jsst’s picture

Version: 7.x-1.x-dev » 7.x-1.3
Status: Needs review » Reviewed & tested by the community

This patch has been confirmed to fix the problem by several people, and I can confirm it too. Without this patch, pathauto_alias_uniquify() will end up in an infinite loop because pathauto_is_alias_reserved() always returns false on non-mysql backends.

RTBC -> ship it!

  • Dave Reid committed 3ec72f7 on 7.x-1.x
    Issue #2582655 by John Morahan, Dave Reid: Fixed issues with SQLite by...
Dave Reid’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed #15 to 7.x-1.x. Thanks everyone!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.