Tips and Tricks HQ Support Portal › Forums › WP PDF Stamper › WP PDF Stamper Troubleshooting › PDF Stamper – Getting 502 Gateway Error
Tagged: pdf stamper, WPEngine
- This topic has 13 replies, 4 voices, and was last updated 10 years, 8 months ago by
wzp.
-
AuthorPosts
-
December 16, 2013 at 9:21 pm #10247
kramdraw85
MemberI get intermittent errors when trying to use the API to stamp a pdf. It will work about 30% of the time.
I have tried both stamping methods. My host is WP Engine
December 16, 2013 at 10:12 pm #59697mbrsolution
SpectatorHello try the following plugin for the minimum requirements
Because you are using WP Engine, can you ask them if this plugin is accepted by them? I know they are very strict when it comes to plugins running in their servers.
Kind regards
December 17, 2013 at 4:41 am #59698kramdraw85
MemberAlready did that, minimum requirements are met.
December 17, 2013 at 8:10 am #59699kramdraw85
MemberWhat exactly would be causing this issue? It would be nice to have some things to bounce off of WP Engine so we can trouble shoot this further.
December 17, 2013 at 10:19 pm #59700admin
KeymasterAsk WP Engine the following question:
When I go to use a system to stamp PDF file, it gives a 502 Bad Gateway error intermittently. This happens intermittently so the server is not liking something when it fails but how can I get more info on what the server is not liking? If there was an issue in the script then it would fail every time but it only fails intermittently.
December 18, 2013 at 3:41 am #59701wzp
ModeratorThink the Twitter “Fail Whale.”
‘http://pcsupport.about.com/od/findbyerrormessage/a/502error.htm’
December 29, 2013 at 10:50 pm #59702kramdraw85
MemberThe response from the webhost was:
“If they say that there is something on our end that can be tweaked, I’ll be more than happy to look into accommodating their suggestion. Unfortunately without the additional information from the developer, we wouldn’t really be able to know where to begin looking for what’s causing the error.”
Is there any thing that I can ask them to look for?
December 30, 2013 at 2:15 am #59703admin
KeymasterI understand that but the issue is that the server doesn’t tell us what its not liking at all. There is not error message or anything. It just says 502 error which is a very generic error code that doesn’t really mean anything. Is the server’s memory getting overloaded at that stage? Is the CPU getting overloaded?
Will it help, if you can give them the URL that they can click on again and again until they see that error. Then when they do they can investigate various server parameters to get more info (instead of just a generic 502 code).
December 31, 2013 at 11:01 pm #59704kramdraw85
MemberFrom WebHost:
I’ve been looking around trying to find the cause of the error and I found a couple entries in the nginx error log:
2013/12/31 00:34:55 [error] 31917#0: *335952 upstream prematurely closed connection while reading response header from upstream, client: 198.58.119.83, server: www.foxlsat.com, request: "POST /wp-content/plugins/wp-pdf-stamper/api/stamp_api.php HTTP/1.1", upstream: "http://127.0.0.1:6789/wp-content/plugins/wp-pdf-stamper/api/stamp_api.php", host: "www.foxlsat.com"
2013/12/31 00:39:37 [error] 31917#0: *337717 upstream prematurely closed connection while reading response header from upstream, client: 198.58.119.83, server: www.foxlsat.com, request: "POST /wp-content/plugins/wp-pdf-stamper/api/stamp_api.php HTTP/1.1", upstream: "http://127.0.0.1:6789/wp-content/plugins/wp-pdf-stamper/api/stamp_api.php", host: "www.foxlsat.com"
2013/12/31 00:46:45 [error] 31917#0: *340628 upstream prematurely closed connection while reading response header from upstream, client: 198.58.119.83, server: www.foxlsat.com, request: "POST /wp-content/plugins/wp-pdf-stamper/api/stamp_api.php HTTP/1.1", upstream: "http://127.0.0.1:6789/wp-content/plugins/wp-pdf-stamper/api/stamp_api.php", host: "www.foxlsat.com"
2013/12/31 01:20:36 [error] 31912#0: *352355 upstream prematurely closed connection while reading response header from upstream, client: 198.58.119.83, server: www.foxlsat.com, request: "POST /wp-content/plugins/wp-pdf-stamper/api/stamp_api.php HTTP/1.1", upstream: "http://127.0.0.1:6789/wp-content/plugins/wp-pdf-stamper/api/stamp_api.php", host: "www.foxlsat.com"
When trying to download a PDF, it looks like the file stamped.pdf is requested, which then makes a request to stamp_api.php. It’s at this point it looks like the connection is being closed, which will result in a 502 error. It looks like stamp_api.php is an encrypted file so I’m unfortunately unable to see what exactly that file is doing.
I tried to download a file and monitored the server resources while doing so and I didn’t see it running out of memory or using too much CPU.
December 31, 2013 at 11:56 pm #59705kramdraw85
Memberfyi…the stamped.pdf is actually stamped.php and it is where I put the API code.
stamped.php contents:
[removed code after checking it]
January 1, 2014 at 11:18 pm #59706admin
KeymasterThe plugin doesn’t close any connection (otherwise it would do it on every single site). Obviously something on this site is causing it to close the connection but I have no idea what that is. Are you trying to stamp files from s2Member plugin?
January 4, 2014 at 12:59 am #59707kramdraw85
MemberIt is pulling in the files from a s2Member plugin folder, but I setup a copy of the site on another server and it is working fine. Could it be a permissions issue?
January 4, 2014 at 1:08 am #59708kramdraw85
MemberI also noticed that the created files are being hosted on a cdn. Perhaps that is where the miscommunication is happening?
January 4, 2014 at 1:11 am #59709wzp
ModeratorAll source and destination files must be on the same server that is running PDF Stamper.
-
AuthorPosts
- You must be logged in to reply to this topic.