Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Endless Processes trace ENOENT (No such file or directory) #8082

Closed
mettleshade opened this issue Oct 23, 2023 · 9 comments
Closed

Bug: Endless Processes trace ENOENT (No such file or directory) #8082

mettleshade opened this issue Oct 23, 2023 · 9 comments

Comments

@mettleshade
Copy link

PHP Version

8.0

CodeIgniter4 Version

latest

CodeIgniter4 Installation Method

Composer (as dependency to an existing project)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

apache

Database

MariaDB 10.6

What happened?

Hello friends, the process of searching for missing files in my project is ongoing and doesn't stop. I have updated Composer, but the issue remains unresolved.

Steps to Reproduce

When I enter the command "strace -tt -T -p pid_id" via SSH, I can see the errors.

Expected Output

bug fix.

Anything else?

Screenshot_1

@mettleshade mettleshade added the bug Verified issues on the current code behavior or pull requests that will fix them label Oct 23, 2023
@kenjis
Copy link
Member

kenjis commented Oct 23, 2023

Cannot reproduce.

@mettleshade
Copy link
Author

It appears to be happening when the website's traffic is increasing. Currently, all processors are at 100%.

Cannot reproduce.

@kenjis kenjis removed the bug Verified issues on the current code behavior or pull requests that will fix them label Oct 23, 2023
@kenjis
Copy link
Member

kenjis commented Oct 23, 2023

Ah, it is probably not a bug.

If you write code like helper('foo'),
CI4 searches for the helper file foo_helper.php in all namespaces by default.

Helpers will be automatically discovered within defined namespaces when using the helper() function, as long as it is within the namespaces Helpers directory:
https://codeigniter4.github.io/CodeIgniter4/general/modules.html#helpers

Specify Composer packages to search:
https://codeigniter4.github.io/CodeIgniter4/general/modules.html#specify-composer-packages
or if you want to load single helper file, specify the namespace:
https://codeigniter4.github.io/CodeIgniter4/general/helpers.html#loading-from-non-standard-locations

@mettleshade
Copy link
Author

Ah, it is probably not a bug.

If you write code like helper('foo'), CI4 searches for the helper file foo_helper.php in all namespaces by default.

Helpers will be automatically discovered within defined namespaces when using the helper() function, as long as it is within the namespaces Helpers directory:
https://codeigniter4.github.io/CodeIgniter4/general/modules.html#helpers

Specify Composer packages to search: https://codeigniter4.github.io/CodeIgniter4/general/modules.html#specify-composer-packages or if you want to load single helper file, specify the namespace: https://codeigniter4.github.io/CodeIgniter4/general/helpers.html#loading-from-non-standard-locations

Thank you! Can we specify exact locations for our own helpers in the system, for example: app/Helpers/test_helper.php? I couldn't find it in the documentation.

@mettleshade
Copy link
Author

After uploading the file, does keep search!
Screenshot_2

Does it upload the files again every time the user enters the site?

@kenjis
Copy link
Member

kenjis commented Oct 23, 2023

@mettleshade What did you upload? and what do you want?
It seems scanning for unrelated composer package namespaces is gone.

@kenjis
Copy link
Member

kenjis commented Oct 23, 2023

Can we specify exact locations for our own helpers in the system, for example: app/Helpers/test_helper.php?

helper('App\test');
// or
helper('App\Helpers\test');

But the following would be faster.

require APPPATH . 'Helpers/test_helper.php';

@kenjis kenjis mentioned this issue Oct 23, 2023
2 tasks
@mettleshade
Copy link
Author

Thank you. I have disabled Composer Packages and Auto-Discovery, but there hasn't been a significant improvement in performance. I'm considering making performance-enhancing changes, and if I do, I'll let you know.

@kenjis
Copy link
Member

kenjis commented Oct 24, 2023

Thank you for the info. Checking for non-existent helpers, etc. is useless, but does not seem to have a significant impact on performance.

It seems your server is just busy because of huge traffic.
Examine the bottleneck and eliminate it.

@kenjis kenjis closed this as completed Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants