Is it working?
-
I’m not sure what the plugin is doing. So, I go into Media -> Cleaner and click on the “Scan” button. It displays the words “Read medias…” and then…. nothing. What it supposed to happen at this stage? Or am I doing something wrong?
-
Looks like something break during that first stage. Do you see something happening in your console log? (Chrome Developer Tools)
I’m getting the following…
POST https://www.artiss.co.uk/wp-admin/admin-ajax.php 500 (Internal Server Error)
load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.5.3:4send @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.5.3:4
ajax @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.5.3:4
n.(anonymous function) @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.5.3:4
wpmc_scan_type @ media-cleaner.js?ver=3.0.4:172wpmc_scan @ media-cleaner.js?ver=3.0.4:215
onclick @ upload.php?page=media-cleaner:594Hello,
POST https://www.artiss.co.uk/wp-admin/admin-ajax.php 500 (Internal Server Error)
That means there is a PHP error (server-side). Can you check your PHP Error Logs? We will know more.
I’ve looked at my logs and can’t see anything other than what’s reported above.
I tried the usual thing of deactivating all plugins and switching to a default theme but the same persists. All other Ajax on my site is working fine.
500 (Internal Server Error)
That means an error happened on the server-side, it is definitely logged somewhere. Do you have access to your PHP error logs? It’s impossible that they are empty, they always have warnings, errors, things always happen. Otherwise we really can’t know or guess what happens ??
I am looking at the only logs available from my host.
Maybe they don’t let you access to everything. If you see something like “500 (Internal Server Error)”, this is your access logs. What we need is PHP error logs. If you ask, they will give you. They can also make it available on your install normally. You can also try this: https://www.ads-software.com/plugins/error-log-monitor/. But it doesn’t work for everyone.
(if you want me to make my own thread, i am happy to, but my issue seems very similar, so though I would combine).
Here is a screenshot of my plugin after running for 18 hours, same as Dartiss it seems. https://honeytrek.com/si/2016-07-17_19-03-25.png
I checked my error log in Cpanel, I don’t see any 500 errors in there. Anything particular I am looking for, or keywords I can search for?
I just had the same issues.
First it was “PHP Fatal error: Allowed memory size of 134217728 bytes exhausted”
fixed by upping php.ini memory_limit to 1024M
Then “PHP Fatal error: Maximum execution time of 120 seconds exceeded”
fixed by upping php.ini max_execution_time to 240.
That allows the first xhr request to return an array of 29k of media IDs (I’m sure that isn’t the best way to be doing it)
The next xhr request to “wpmc_scan_do” with 5 IDs resulted in “WordPress database error Got a packet bigger than ‘max_allowed_packet’ bytes for query INSERT INTO
wp_options
(option_name
,option_value
,autoload
) VALUES (‘_transient_wpmc_galleries_images’,”fixed by upping my.cnf max_allowed_packet to 16M
Now its finally chugging away, at about 1 image per 3 secs, and im expecting it to crash as soon as it encounters an image bigger than 16m. This will be fun.
Looks like the plugin could do with some optimizing.
Same thing here. Stuck on “Read medias…”
I don’t know, is it supposed to show a percentage of completion?Nothing in my error_log. Looking at Mozilla’s web console
POST XHR .../wp-admin/admin-ajax.php [HTTP/1.1 200 OK 1073ms] POST XHR .../wp-admin/admin-ajax.php [HTTP/1.1 404 Not Found 61176ms] POST XHR .../wp-admin/admin-ajax.php [HTTP/1.1 200 OK 1297ms] POST XHR .../wp-admin/admin-ajax.php [HTTP/1.1 200 OK 675ms] POST XHR .../wp-admin/admin-ajax.php [HTTP/1.1 200 OK 664ms] etc.
Request Headers 20:38:15.000 X-Requested-With: XMLHttpRequest User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0 Referer: .../wp-admin/upload.php?page=media-cleaner Pragma: no-cache Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Content-Length: 48 Connection: keep-alive Cache-Control: no-cache Accept-Language: en-US,en;q=0.7,el;q=0.3 Accept-Encoding: gzip, deflate Accept: */*
Response Headers Δ61136ms X-Powered-By: PHP/7.0.13 x-content-type-options: nosniff Vary: Accept-Encoding, User-Agent Transfer-Encoding: chunked Server: nginx Link: <.../wp-json/>; rel="https://api.w.org/" Expires: Wed, 11 Jan 1984 05:00:00 GMT Date: Fri, 23 Dec 2016 18:39:23 GMT Content-Type: text/html; charset=UTF-8 Content-Encoding: gzip Connection: keep-alive Cache-Control: no-cache, must-revalidate, max-age=0
Btw, it is a fresh installation with imported content, hardly with any plugins in it (Heartbeat Control & EWWW Image Optimizer active), just lots of media. Also, I’m on maintenance mode, I haven’t set up DNS yet etc.
- This reply was modified 7 years, 11 months ago by techsmurfy.
- This reply was modified 7 years, 11 months ago by techsmurfy.
Hi,
The very first part of the process is the most intensive, it basically list all the files or all the media. It is actually NOT intensive, it is just asking the DB for the list of IDs of all the media, that is normally fine but can be a problem if your Media Library is really huge. The real process (with a %) starts right after that.
@techsmurfy, how many media do you have? Do you think you could contact me directly so that I could try to debug on your install? I have never had the problem myself even on big installs, so I need to find an environment where I can experience this.
I did an exhausting import from blogger after thousands of timeouts but in the end I managed to import around 32.000 posts (with a couple of thousand duplicates due to timeouts, which I did manage to erase with a few sql queries).
The photos were supposed to be around 80.000, but the importer plugin just stuck at 7.500. So normally I would have 7.500 photos, but for some reason I have 27.000 photos (some photos were imported 100x and 1000x times!) so I needed a plugin to find the unused duplicates. The thing is that they all are “attached” in theory, so I cannot just filter by unattached. But in practice, only one set of photos are attached to posts, the rest are copies.
I was hoping a plugin would just correspond img src links inside posts to the database, and filter out the rest. No plugin worked for me, most just hang, the only one that did manage to index my images was Image Cleanup, but it’s pretty old so it encountered a fatal error right after that.
Also I’m on a shared server. I haven’t even installed a premium theme yet, I have to clean up this mess first and see what I can do with redirections.
So I started erasing photos manually, checking the posts myself. I will contact you though.
Guys, whoever is participating in this thread or having issues, it is important to tell me:
– which scan you are using: media or filesystem
– how many media, or how media files/folders you have in your /uploads
– your memory allowed in PHPThank you ?? I would like to replicate your cases.
Hi,
I encountered the issues highlighted above, and traced it to a timeout. Increasing the max_execution_time to 300 in php.ini solved the problem for me.was set to 30secs which I’m guessing on a large media library might not be long enough to collate the entries?
Jordy, I was scanning media and there’s approx 33k items. PHP memory is on 40meg.
C.
The new thread for follow ups on this is here: https://www.ads-software.com/support/topic/about-issues-with-huge-media-library/
- The topic ‘Is it working?’ is closed to new replies.