Unable to connect to Appium happening randomly

Hey everyone. I’m using Appium 1.6.4 in 2 machines to run tests on real iOS devices, one using xcode7 (for devices below or equal to iOS 9.2) and another using xcode8 (for devices above iOS 9.2). The first machine run tests without a problem, I’m able to run tests on it for xcode7 or xcode8. The second machine do the same, however, randomly, I receive a message informing that was Unable to connect to Appium Server. If I try again a few times, I can connect again. If I restart the device to be tested, the problem is solved for the first execution. Any clues?

LOG for xcode8 attempts
[Appium] Welcome to Appium v1.6.4
[Appium] Non-default server args:
[Appium] port: 5700
[Appium] backendRetries: 20
[Appium] tmpDir: tmp/5700/
[Appium] udid: 21cdf7861ac9ab7a4e1171c32362ae73b9ed747a
[Appium] Deprecated server args:
[Appium] -U,–udid => --default-capabilities ‘{“udid”:“ZZZ”}’
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] udid: ‘ZZZ’
[Appium] Appium REST http interface listener started on 0.0.0.0:5700
[Appium] Received SIGTERM - shutting down

LOG for xcode7 attempts
[Appium] Welcome to Appium v1.6.4 (REV 6669e91bd8187ae9efbf110e31fc4e4d7b79011f)
[Appium] Non-default server args:
[Appium] port: 5702
[Appium] backendRetries: 20
[Appium] tmpDir: ‘tmp/5702/’
[Appium] udid: ‘c59631c3579ff12a52e8f3358ab2a5617d050f9e’
[Appium] Deprecated server args:
[Appium] -U,–udid => --default-capabilities ‘{“udid”:“XXX”}’
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] udid: ‘XXX’
[Appium] Appium REST http interface listener started on 0.0.0.0:5702
[Appium] Received SIGTERM - shutting down
[Appium] Received SIGTERM - shutting down
[Appium] Received SIGTERM - shutting down