Closed (fixed)
Project:
XML sitemap
Version:
6.x-2.0-beta1
Component:
xmlsitemap.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 May 2010 at 05:56 UTC
Updated:
30 May 2010 at 22:00 UTC
Jump to comment: Most recent
Comments
Comment #1
dave reidYou'll need to upgrade to the latest Drupal core, 6.16.
Comment #2
venusrising commentedI am updated to current Drupal core
Comment #3
dave reidThen something went wrong with your upgrade. You should have a includes/lock.inc file in your Drupal directory. You might want to also follow #732064: "Call to undefined function lock_acquire", locale module and see if that solves your problem.
Comment #4
venusrising commentedComment #5
venusrising commentedYes the lock file exists and we are not having any other issue with any other modules. I don't see how the item would apply to our situation. Is there anything else we can do to check? Thank so much.
Comment #6
venusrising commentedIf I disable the module I can run cron again.
Comment #7
dave reidIs your locale.module enabled?
Comment #8
venusrising commentedI have now reenabled just the XML Core module and it returns the same error.
Comment #9
venusrising commentedComment #10
venusrising commentedNo because we were not using the internationalization sitemap module etc. But I enabled it and still the error.
Comment #11
venusrising commentedJust wanted to let you know how I fixed this.
1 Disabled Module
2. Deleted Beta 1 module folder
3. Recopied over Alpha
4. Enabled module
5. It showed the Alpha Update
6. Deleted XML Module Folder
7. Installed Alpha
8. Ran Update.php
Thanks for the update tip, sometimes those go bonkers
Comment #12
dave reidWell, that doesn't really fix the problem at all. How is your cron being run? Poormanscron? Command line?
Comment #13
dave reidComment #14
venusrising commentedThe problem is back again Fatal error: Call to undefined function lock_acquire() in /home/xxxxp/html/sites/all/modules/xmlsitemap/xmlsitemap.module on line 1162
The cron is set on a schedule to run and this is the first time we have had an issue with cron or this module
Manually executed from within webmin I get
Output from command wget -O - -q -t 1 http://www.xxxxp.com/cron.php ..
Fatal error: Call to undefined function lock_acquire() in /home/xxxx/html/sites/all/modules/xmlsitemap/xmlsitemap.module on line 1162
I have never had any issues since these updates nor do we with anything else so it is hard to figure what it could be. Also, the sitemap never had a date or last time run when updated last fix until we re ran cron.
It is also saying sitemap is out of date but we cannot run cron. Frontpage is set to 1 day min.
Comment #15
Anonymous (not verified) commentedAre you sure your Drupal core is good? The lock_acquire function is provided by Drupal. By the time the hook_cron implementations are executing lock_acquire should be available and the only reason it wouldn't be is because the required ./includes/lock.inc file wasn't included for some reason.
So, what is wrong with your Drupal core system?
What php errors do you see in watchdog log besides this one?
Are there differences in the core files that shouldn't be there?
What is the httpd error log telling you?
Comment #16
venusrising commentedCron run exceeded the time limit and was aborted.
Fatal error: Call to undefined function lock_acquire() in /home/xxxx/html/sites/all/modules/xmlsitemap/xmlsitemap.module on line 1162
When XML sitemap is disabled all works fine, does this clash with nodewords? All worked fine until the upgrade. The only thing I did different was add a menu to be included in the sitemap.
Comment #17
dave reidPlease try the patch in #732064-92: "Call to undefined function lock_acquire", locale module even though you're not using locale.module. It will probably help fix this for you.
Comment #18
venusrising commentedI will try it but weird thing. If I rebuild the sitemap, it gets rebuilt Then cron will run fine. Any idea of why that would be?
Comment #19
venusrising commentedYesterday I rebuilt the sitemap and cron ran again fine. Today the error is back again.
Fatal error: Call to undefined function lock_acquire() in /home/xxxx/html/sites/all/modules/xmlsitemap/xmlsitemap.module on line 1162
If I disable the module cron runs again fine.
I am hesitant to patch any Drupal core modules when we have multiple modules installed and the only one giving us the issue is xml sitemap.
The only new portion of XML Sitemap that we are using is the menu component and we are including a custom menu we made.
Also the XML Sitemap config area shows
One or more problems were detected with your XML sitemap configuration:
* The XML cached files are out of date and need to be regenerated. You can run cron manually to regenerate the sitemap files.
So, if i rebuild the sitemap then cron will run again fine which is what I did yesterday but it did not stick as you can see as it occured today again.
Can this be a cache issue or overloading of something? We are on a dedicated server so this should not be the issue and do know there were scalability issues at one point per http://2bits.com/articles/xml-sitemap-6x-2x-how-drupal-modules-can-overl...
I also see on the site status page it says XML sitemap maximum file size 0 bytes
XML sitemap Last generated on 05/07/2010 - 4:49pm (19 min 33 sec ago).
Thanks for your help
Comment #20
dave reidI guess I'll have to add conditions to check for the presence of the locking API instead of trying to assume it exists. There are going to be some D6 users not using the latest release or encountering #732064: "Call to undefined function lock_acquire", locale module.
Committed to DRUPAL-6--1: http://drupal.org/cvs?commit=364200
Comment #21
Anonymous (not verified) commentedGive the Elysia Cron module a try. You can run each hook_cron in separate windows and even manually.
Comment #22
venusrising commentedDavid-
Per #20 I see the link to the code fix, does this mean this will be committed to a new version OR shall I go and see changes and make them manually. Sorry I am not a patch pro so I am trying to learn and make sure.
Earnie-
I am not above trying that module but would prefer not to add another module if it is not needed. mind sharing hwy you like it or how you use it as it looks interesting.
Does it find the cron task Drupal has in place or would I have to know them on my own?
Thanks all for your replies and help.
Comment #23
Anonymous (not verified) commentedI like elysia_cron because you can set up the various hook_cron implementations to execute at different times. So if you want to aggregate only once a day, execute xmlsitemap four times a day, build the search data twice a day you can do it. Plus you can disable some hook_cron implementation to run manually while all of the others execute you can even do that. It gives you the control on which hook_cron implementations to execute at what time. I would set the external cron to execute once every 5 minutes and then control the hook_cron implementations so that xmlsitemap is executing alone. Especially avoid a heavy hitting hook_cron implementation such as the search module executing at the same time as xmlsitemap. You can set up elysia_cron so that xmlsitemap gets the full 4 minute cron cycle to itself.
Comment #24
dave reid@venusrising: Feel free to make the small changes yourself manually. It should solve the cron problems for you. As such, I'm marking this issue as fixed.
Comment #25
venusrising commentedSorry for marking this back to active but I did want to give you an update. So far, after regenerating the sitemap yesterday I do not see that error again. So I will wait to apply this patch this weekend to see if I can find more info that may help discover any conflicts from other modules etc.
Thanks Dave I got the code, thanks for the patch and I will let you know what else I find.
Comment #26
venusrising commentedDavid-
I tried to manually apply your 364200 to the xml sitemap module but the code lines do not match my xmlsitemap module file.
Comment #27
venusrising commentedThe numbers on the latter are more in the 1600. I am testing and will post results.
Comment #28
dave reidLet's just leave this at fixed for now. If you do encounter a problem in your testing, you can re-open. But it's just helpful for me to know I've already addressed this issue.
Comment #29
venusrising commentedJust wanted to let you know that the patch has been running for a week and it seems to have solved the issue.
Thanks for the swift help.