[wp-trac] [WordPress Trac] #29775: Media manager bug
WordPress Trac
noreply at wordpress.org
Wed Dec 10 22:42:02 UTC 2014
#29775: Media manager bug
-------------------------------+------------------------------
Reporter: rudybrinkman | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.0
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by rudybrinkman):
Replying to [comment:33 johnbillion]:
> Yep thanks for that video, it's a big help.
>
> In an effort to narrow down where the problem lies, can you switch to
"List mode" and see if the page loads ok? List mode is the grey icon below
(I noticed you erroneously clicked the blue grid mode icon a second time
when you said you switched modes).
>
> [[Image(https://i.imgur.com/4qLZ92U.png)]]
>
> Once you're in list mode, can you test if uploading files from there
works as expected or whether it still hangs? Also, does an upload work
from this screen once you've killed the resource-hogging processes?
Tested though it's of course not a good idea to do so since it calls the
same scripting (admin-ajax.php). Makes no differences same thing happend.
I´ve been digging trough the error messages and finally found somtehing,
it is causing errors because the script takes too long and too much memory
so it seems. The user/site was having 2Gb of memory and 'unlimited'
resources:
{{{
[lsapi:error] [pid 1043094:tid 140230313806144] [client *ip-address
removed*:54406] Backend fatal error: PHP Fatal error: Maximum execution
time of 30 seconds exceeded in /{path}/public_html/cms/wp-
includes/functions.php on line 1497, referer: http://bijbelcollege.nl/cms
/wp-admin/upload.php
}}}
And there's also an error linking to this entry:
http://www.cloudlinux.com/docs/errors/MHL-E2BIG.php
As you can see they say: "If you also see that user is hitting CPU limit
at the same time at the same time as entry processes limit, raising just
entry processes limit will not help. '''User is using too much
resources''', and you should either increase both, CPU and entry process
limits, or '''user should optimize their script''', or user should be
upgraded to VPS or something similar."
Anyway - I've upgraded the user to 4 GB of ram memory and 'unlimited'
resources. Still the same problems exists; after uploading an image it
ends with "http error" on screen. And the usage of CPU is still extreme:
{{{
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
43534 baktueel 30 10 158m 47m 4812 R 93.6 0.6 1:42.96
/usr/local/bin/lsphp:ge.nl/public_html/cms/wp-admin/admin-ajax.php
}}}
So the script does finish now but it's still using 93.6% CPU, when it's
got all these resources but it ends with an error and still doesn't
function (in neither one of the views). See the below logging for the
reasons; it still runs out of the time of 30 seconds (that should be more
than enough for a script to finish loading a few images though)
{{{
[Wed Dec 10 22:52:20.561788 2014] [lsapi:error] [pid 29333:tid
139861013096768] [client 94.212.94.230:54654] [host bijbelcollege.nl]
Backend fatal error: PHP Fatal error: Maximum execution time of 30
seconds exceeded in /{path to domain}/bijbelcollege.nl/public_html/cms/wp-
includes/functions.php on line 1497, referer: http://bijbelcollege.nl/cms
/wp-admin/
[Wed Dec 10 22:53:04.122262 2014] [lsapi:error] [pid 29334:tid
139861107505472] [client 94.212.94.230:54660] [host bijbelcollege.nl]
Backend fatal error: PHP Fatal error: Maximum execution time of 30
seconds exceeded in /{path to domain}/bijbelcollege.nl/public_html/cms/wp-
includes/functions.php on line 1497, referer: http://bijbelcollege.nl/cms
/wp-admin/upload.php
[Wed Dec 10 22:54:00.413020 2014] [lsapi:error] [pid 29333:tid
139860908198208] [client 94.212.94.230:54670] [host bijbelcollege.nl]
Backend fatal error: PHP Fatal error: Maximum execution time of 30
seconds exceeded in /{path to domain}/bijbelcollege.nl/public_html/cms/wp-
includes/functions.php on line 1497, referer: http://bijbelcollege.nl/cms
/wp-admin/media-new.php
[Wed Dec 10 22:54:30.618190 2014] [lsapi:error] [pid 29333:tid
139860992117056] [client 94.212.94.230:54675] [host bijbelcollege.nl]
Backend fatal error: PHP Fatal error: Maximum execution time of 30
seconds exceeded in /{path to domain}/bijbelcollege.nl/public_html/cms/wp-
includes/functions.php on line 1497, referer: http://bijbelcollege.nl/cms
/wp-admin/media-new.php
[Wed Dec 10 22:55:21.519313 2014] [lsapi:error] [pid 29333:tid
139861128485184] [client 94.212.94.230:54686] [host bijbelcollege.nl]
Backend fatal error: PHP Fatal error: Maximum execution time of 30
seconds exceeded in /{path to domain}/bijbelcollege.nl/public_html/cms/wp-
includes/functions.php on line 1497, referer: http://bijbelcollege.nl/cms
/wp-admin/upload.php?mode=grid
[Wed Dec 10 22:56:47.393895 2014] [lsapi:error] [pid 29333:tid
139860950157632] [client 94.212.94.230:54705] [host bijbelcollege.nl]
Backend fatal error: PHP Fatal error: Maximum execution time of 30
seconds exceeded in /{path to domain}/bijbelcollege.nl/public_html/cms/wp-
includes/functions.php on line 1497, referer: http://bijbelcollege.nl/cms
/wp-admin/upload.php
[Wed Dec 10 22:57:17.686628 2014] [lsapi:error] [pid 29333:tid
139861149464896] [client 94.212.94.230:54707] [host bijbelcollege.nl]
Backend fatal error: PHP Fatal error: Maximum execution time of 30
seconds exceeded in /{path to domain}/bijbelcollege.nl/public_html/cms/wp-
includes/functions.php on line 1497, referer: http://bijbelcollege.nl/cms
/wp-admin/upload.php
}}}
I looked at the code that is reported as the problem, line 1497
(functions.php) is in this part:
{{{
// We need to find the permissions of the parent folder that
exists and inherit that.
$target_parent = dirname( $target );
while ( '.' != $target_parent && ! is_dir( $target_parent ) ) {
$target_parent = dirname( $target_parent );
}
}}}
The while statement. I do have some idea what it does, but not exactly.
Anyway -- I hope this helps. I've done all the testing and tweaking I
could possibly do on a live, production, server.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29775#comment:35>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list