Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a drupal site in development that is running very slow and running http process that reaches 100% cpu utilization and pages take up to 60 seconds to load. Running strace on the apache webserver (httpd) process outputs ENOENT (No such file or directory) as follows:
17603 22:46:42 stat("/var/www/vhosts/example.com/httpdocs/includes/./sites/all/modules/token/token_node.inc", 0x7fd2a7667848) = -1 ENOENT (No such file or directory)
17603 22:46:42 read(47, "<?php\n// $Id: token_node.inc,v 1"..., 8192) = 8192
17603 22:46:42 read(47, "node']['node-url'] = t('T"..., 8192) = 6273
17603 22:46:42 read(47, "", 8192) = 0
17603 22:46:42 read(47, "", 8192) = 0
17603 22:46:42 close(47) = 0
and a bunch of these before and after the above...
17603 22:46:42 lstat("/var/www/vhosts/example.com/httpdocs/includes/sites", 0x7fff191c1ae0) = -1 ENOENT (No such file or directory)
Both the folder and the file paths are not correct, hence the error, but what piece of code/module could be calling these paths?
/includes/sites
includes/./sites/all/modules/token/token_node.inc
Thanks in advance for any help,
KH
Comments
Comment #1
Dave ReidThat is called by the token_include() function which calls
module_load_include('inc', 'token', 'token_node');
Comment #2
3dloco CreditAttribution: 3dloco commentedHello Dave,
Thanks for your help!...but I am not sure what to do with the info you provided above. Do I look for modules that use token_include() or is this used by the token module itself? Also, how do I know when it is not being used properly....Essentially, I'd like to know what is best way to go about fixing
token_include() function
invalid reference to folders that don't exist....?Thanks in advance for any pointers and help you can provide,
KH
Comment #3
Dave ReidIt sounds like Drupal is thinking it's inside the wrong directory, and causing problems. Since you're the only one to report this bug, it seems very likely it's something wrong just on your install or system, so I'm moving this to a support request.
Comment #4
3dloco CreditAttribution: 3dloco commentedHello Dave,
This is a difficult one for me to diagnose at the moment, but I've managed to offload httpd by using Memcached and uninstalling mod_pagespeed. This seems to have helped but at this point don't know for sure until I get back on it....at least the 100% cpu spikes are only a few seconds and not enough to bring the server to halt.
So, next time I do my next round of httpd optimization, I'll look into this again and re-open if it is still an issue.
Appreciate your time and help,
Regards,
KH
Comment #5
figureone CreditAttribution: figureone commentedThis may be unrelated, but I was just tracing similar errors and they went away when I disabled the Token Filter contrib module. If you have that module enabled, it might be the source of the problem.
I'm on vacation right now, so I haven't traced it any further than that. But it might be a good idea to let the Token Filter maintainers know!