504 Gateway Time-out nginx

Hello support team,

When i’ve installed rtMedia, then my site has display - 504 Gateway Time-out. this issue has happened more than a year ago. but i wish to use rtMedia. please help.

Hello @cookkoo,

From the error-code [ 504 ], it seems to be the server related issue. Please, once try to contact your server team regarding this issue. Reference link - https://www.lifewire.com/504-gateway-timeout-error-explained-2622941

Thanks, Pranali

Hello support team,

For more information, When I’ve activated rtMedia my site can not open it’s display blank page. But when I’ve deactivated rtMedia again. It work like a charm. Please help.

Regards,

Sermsak H

Hello @cookkoo,

Please, try to troubleshoot this issue by re-saving the permalink structure. Here is the document which can guide you on this - https://rtmedia.io/docs/troubleshooting/solve-404-page-not-found-error-media-tab-buddypress/

Thanks.

Hello pranalipatel,

Thank you for your help. but after i’ve try to check and i found the issue is.

  1. When i’ve enable Buddypress - Activity Streams Components and Deactivate rtMedia. my site’s work fine but don’t display “Media” in Member Profile (Because rtMedia deactivate).

2.When i’ve disable Buddypress - Activity Streams Components and Activate rtMedia. my site’s work fine but don’t display “Activity” in any page (Because Buddypress - Activity Streams Components deactivate).

  1. When i’ve enable Buddypress - Activity Streams Components and Activate rtMedia. my site is DOWN and can not do anything. Only when i’ve FTP to server and change the name of rtMedia for example rtMediaXXX. then my site can open again.

I’ve check this process more than 2-3 times. This is the conflict between both plugins. please help.

Regards,

Hello @cookkoo,

rtMedia and BuddyPress are compatible with each other hence it should work. Please, check your server error log and let us know what error you are facing when your site is down.

Also, try checking the same by deactivating other plugins ( except rtMedia and BuddyPress ) and activating any default theme of WordPress. This will help to avoid the conflicts if any.

Thanks.

Hello pranalipatel,

I’ve edit wp-config.php by follow this link https://codex.wordpress.org/Debugging_in_WordPress#PHP_Errors.2C_Warnings.2C_and_Notices, as below:

// Enable WP_DEBUG mode define( ‘WP_DEBUG’, true );

// Enable Debug logging to the /wp-content/debug.log file define( ‘WP_DEBUG_LOG’, true );

// Disable display of errors and warnings define( ‘WP_DEBUG_DISPLAY’, false ); @ini_set( ‘display_errors’, 0 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files) define( ‘SCRIPT_DEBUG’, true ); NOTE: You must insert this BEFORE /* That’s all, stop editing! Happy blogging. */ in the wp-config.php file

After that, i’ve deactivate all plugins ( except rtMedia and BuddyPress ) And then my Plesk Dashboard can not login. it’s display 504 Gateway Time-out nginx. And i can not open wordpress backend and frontend. it’s display Error 502 Bad gateway.

And debug.log details as below:

[11-Jul-2017 13:15:55 UTC] PHP Notice: The called constructor method for WP_Widget in buddymenu_widget_class is deprecated since version 4.3.0! Use

__construct()
instead. in /var/www/vhosts/cookkoo.com/httpdocs/wp-includes/functions.php on line 3894 [11-Jul-2017 13:16:04 UTC] PHP Notice: The called constructor method for WP_Widget in buddymenu_widget_class is deprecated since version 4.3.0! Use
__construct()
instead. in /var/www/vhosts/cookkoo.com/httpdocs/wp-includes/functions.php on line 3894 [11-Jul-2017 13:16:55 UTC] PHP Notice: The called constructor method for WP_Widget in buddymenu_widget_class is deprecated since version 4.3.0! Use
__construct()
instead. in /var/www/vhosts/cookkoo.com/httpdocs/wp-includes/functions.php on line 3894 [11-Jul-2017 13:17:24 UTC] PHP Notice: The called constructor method for WP_Widget in buddymenu_widget_class is deprecated since version 4.3.0! Use
__construct()
instead. in /var/www/vhosts/cookkoo.com/httpdocs/wp-includes/functions.php on line 3894 [11-Jul-2017 13:17:25 UTC] PHP Notice: WP_Admin_Bar::add_node was called incorrectly. The menu ID should not be empty. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /var/www/vhosts/cookkoo.com/httpdocs/wp-includes/functions.php on line 4139 [11-Jul-2017 13:17:32 UTC] PHP Notice: The called constructor method for WP_Widget in buddymenu_widget_class is deprecated since version 4.3.0! Use
__construct()
instead. in /var/www/vhosts/cookkoo.com/httpdocs/wp-includes/functions.php on line 3894 [11-Jul-2017 13:18:23 UTC] PHP Notice: The called constructor method for WP_Widget in buddymenu_widget_class is deprecated since version 4.3.0! Use
__construct()
instead. in /var/www/vhosts/cookkoo.com/httpdocs/wp-includes/functions.php on line 3894 [11-Jul-2017 13:18:28 UTC] PHP Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /var/www/vhosts/cookkoo.com/httpdocs/wp-includes/update.php on line 323

Regards,

P.S Now, i’ve deactivate rtMedia and my site come back again.

Hello pranalipatel,

After i’ve try to testing many times and more than a week. Now, i’ve deactivating other plugins ( except rtMedia and BuddyPress ) and activating default theme of WordPress. the result as below.

  1. If i’ve activated both rtMedia and BuddyPress, i can login to backend but frontend it’s display - Internal Server Error

  2. If i’ve deactivated rtMedia, backend and frontend has work fine.

And debug.log, the error not related with both plugins.as below.

[17-Jul-2017 09:46:28 UTC] WP_Community_Events::maybe_log_events_response: Valid response received. Details: {“api_url”:“https://api.wordpress.org/events/1.0/",“request_args”:{“body”:{“number”:5,“ip”:“xxx”,“locale”:“en_US”,“timezone”:“xxx”}},“response_code”:200,“response_body”:{“location”:{“ip”:“xxx”},“events”:"0 events trimmed.”}} [17-Jul-2017 14:09:17 UTC] PHP Notice: Undefined index: host in /var/www/vhosts/xxx.com/httpdocs/wp-includes/canonical.php on line 444

Please help.

Regards,

Hi @cookkoo,

You need to increase timeouts from configuration file. Please check this reference link: https://asdqwe.net/blog/solutions-504-gateway-timeout-nginx/

This might be helpful to you.

Thanks

Hello bhargavbhandari,

Thank you for your help, and i’ve already done as your suggest above but still have the issue. as it’s stop to work. My site should to work fine ONLY when i’m “deactivate rtMedia” OR activate rtMedia but MUST to disable Buddypress / Activity Streams. please help again.

Regards,

After i’ve try to find ERROR log. now, i’ve found the ERROR issue as below:

PHP Fatal error: Uncaught Error: Class ‘RTMediaActivityModel’ not found in /var/www/vhosts/xxx.com/httpdocs/wp-content/plugins/buddypress-media/app/importers/RTMediaActivityUpgrade.php:128 Stack trace: #0 /var/www/vhosts/xxx.com/httpdocs/wp-content/plugins/buddypress-media/app/importers/RTMediaActivityUpgrade.php(38): RTMediaActivityUpgrade->get_pending_count() #1 /var/www/vhosts/xxx.com/httpdocs/wp-includes/class-wp-hook.php(298): RTMediaActivityUpgrade->add_admin_notice(’’) #2 /var/www/vhosts/xxx.com/httpdocs/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array) #3 /var/www/vhosts/xxx.com/httpdocs/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #4 /var/www/vhosts/xxx.com/httpdocs/wp-admin/admin.php(154): do_action(‘admin_init’) #5 /var/www/vhosts/xxx.com/httpdocs/wp-admin/plugins.php(10): require_once(’/var/www/vhosts…’) #6 {main} thrown in /var/www/vhosts/xxx.com/httpdocs/wp-content/plugins/buddypress-media/app/importers/RTMediaActivityUpgrade.php on line 128

Regards,

For more information. on plugins page, it’s display - The plugin buddypress-media/index.php has been deactivated due to an error: Plugin file does not exist.

For more information, debug log display - PHP Notice: get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead. in /xxx.com/httpdocs/wp-includes/functions.php on line 3831

Hi @cookkoo,

Sorry for the trouble. But this shows one of the files from the rtMedia plugin is missing.

This could be because you tried to update or upload plugin, but somehow that operation couldn’t complete properly.

So try uploading the new plugin and see if it resolves your problem or not.

And for > PHP Notice: get_currentuserinfo

We are not using this function in our plugin. If you have installed any other plugins, so it might come from that only.

Let us know if you have any doubt.

Thank You,