Mock Server 502 Bad Gateway

Archived topic — some details may be out of date.
Mock servers built from saved collection examples are still supported. Postman now also has code-based mocks: JavaScript request handlers plus a config.yaml, stored as files in your Git repository, which you can run locally or deploy. Create one in the app, or use the Postman CLI to generate one from an OpenAPI spec, collection or dataset (postman mock generate) and run it (postman mock run). See About mocks and Create a mock.
Working with an AI coding agent? The Postman plugin can build and run mocks for you.
For current help, see the Postman docs, try the free Postman tools (no account needed), or join us on Discord.

We have a postman Mock Server that has been in place for over a year.

Today we are receiving lots of failures when sending to this and get response:
502 Bad Gatewaynginx

This is very sporadic - it seems to work around 9 times out of 10.

What causes this error for Mock Servers?
Is there anything we can do to prevent it?

There have been no other network issues on our side.

This had not been an issue in the past and there have been no code changes or anything on our side. Is it possible a recent Postman update might have caused some issues?

Many thanks,
Stuart

Hi Stuart, did you find a fix for this?
I have been getting the same issue, and couldn’t find what might be causing it.