Bug #7985
closedCommons lagging/disconnecting when uploading/inserting images
0%
Description
Noted on the TLC site (tlc.commons)... when uploading and then inserting an image, the post editor will lag and then I'll get a connection lost error. I'll reinsert the image, but the previous image will then show up as inserted.
I've seen this periodically before over the past six months.
Files
Related issues
Updated by Boone Gorges over 7 years ago
I just tested a bit, and found some lag in the process, but no errors.
Can you be a bit more specific about exactly where you're seeing the "connection lost" error? Is it after selecting the file for upload (Add Media, then Browse)? Or is it after clicking Insert Into Post? Are you seeing the "connection lost" error in your browser console, or is your main browser window showing an error?
Updated by Luke Waltzer over 7 years ago
Just recreated it on https://tlc.commons.gc.cuny.edu/?p=1793&preview=true
- Lag rendering thumbnails in the media uploader
- then when trying to insert image to post, I get error noted in attached screenshot.
The image eventually appeared (got call, don't know how long it took)
Updated by Boone Gorges over 7 years ago
Thanks for the additional details, Luke. I'm still unable to reproduce exactly, but I do see some lag and some other odd behavior.
We've been seeing some odd tickets this morning that all point toward some changed server configs. I'm going to reach out to IT.
Updated by Raymond Hoh over 7 years ago
TLC has the Anthologize plugin activated.
The issue might be related to Anthologize using a PHP session and the session perhaps not being closed.
The following article about PHP sessions and WordPress explains the problem (read the "Exclusive Locks" section):https://pressjitsu.com/blog/wordpress-sessions-performance/
I experienced similar problems with long-hanging AJAX requests and PHP sessions with the WP Ajaxify Comments plugin.
I did the following to fix the problem in RBE:
https://github.com/r-a-y/bp-reply-by-email/commit/e6828ce6cab07f8fdbdfa8497a79ce497cd918a9
But, we could probably use a more, general fix on the Commons.
Updated by Raymond Hoh over 7 years ago
Luke, I've added a hotfix to the Commons. Can you check and see if uploads are more reactive on TLC now?
Boone, this is what I added:
add_action( 'admin_init', function() { if ( defined( 'DOING_AJAX' ) && true === DOING_AJAX && session_id() ) { session_write_close(); } }, 999 );
Updated by Luke Waltzer over 7 years ago
Sorry guys, just saw these updates. Deactivated Anthologize. Site is running pretty slow, and just uploaded an image to the media library... took over a minute for all the thumbnails to load. Was able to select the image without the disconnection. however.
Updated by Luke Waltzer over 7 years ago
Ran into this issue again while laying out this post: https://jitpstaging.commons.gc.cuny.edu/wp-admin/post.php?post=4117&action=edit.
Screenshot of connection lost error attached.
Report also came in that laying out a JITP staging post with more than a dozen images took an excruciatingly long amount of time.
Updated by Boone Gorges over 7 years ago
- Related to Bug #7997: Transition from single cac-files.php file server to site-specific .htaccess directives added
Updated by Boone Gorges over 7 years ago
See #7997. Let's try to work on that issue this summer, as I think it's the source of much of the mentioned slowness.
Updated by Boone Gorges about 7 years ago
- Has duplicate Support #8602: Member not able to access Media tab on site added
Updated by Boone Gorges about 7 years ago
- Status changed from New to Reporter Feedback
Luke - I worked on this issue this morning and have a status update https://redmine.gc.cuny.edu/issues/7997#note-8 - When you've got a minute, would you please do a bit of testing to see if the performance problem is improved for tlc and other affected sites? If so, perhaps we can close this ticket and continue more general discussion in #7997.
Updated by Boone Gorges about 7 years ago
- Status changed from Reporter Feedback to Resolved
- Target version set to Not tracked
In the interest of clearing out the triage pile, I'm going to close this ticket. Luke, if you continue to experience problems (on non-private sites), please let me know. Thank you!