The source of the intermittent 502 error is a purposeful change introduced in version 10.2 to restart the SOAP process at the 1000th request to avoid the underlying PERL process from a memory growth leak. This memory leak as a result of several MB, several hundred SOAP requests, and eventually several 10000 requests would eventually cause the machine to run out of memory.
When a concurrent SOAP request is made while the SOAP API is restarted, then this results in a 502 bad gateway message. This is documented in the 10.2 Release Notes:
Fixed a problem where the SOAP FCGI process memory usage could grow indefinitely and cause an outage. If soap!max_requests is set the process will restart after that many requests or 1000 otherwise. Clients that make frequent requests of the SOAP API may see a 502 bad gateway, and should re-send the request if encountered.