502 errors on trying to save images

I keep getting the following error when I try to save an image (using plotly_IMAGE in R):

<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>502 Server Error</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>
<h2></h2>
</body></html>

I have updated to the latest version of the R library from github, and it hasn’t helped. Waiting 30s as suggested in the error message doesn’t help. Occasionally, I get lucky and an image is produced, but on most attempts I get this error. This has persisted for several days. Is there a fix?

Replying to myself: the solution was to reduce the complexity of the plots by reducing the number of traces.

Tips to fix-
Refresh the Page and Try a Different Browser.
Clear Your Browser’s Cache.
Flush the DNS Cache.
Check Your Site’s Error Log.
Deactivate Your Plugins and Themes.
Disable Your CDN or Firewall.

Regards,
Rachel Gomez