Connection Reset By Peer errors when making lots of API calls

Hi,

I have an action running every day on a cron schedule. This has been working great for a couple of months, but in the last week or so, after ~15 HTTP requests, my script fails with a Connection reset by peer error. I was wondering if anything has happened recently that might cause this? My repo is private, but here’s my YAML:

name: Run
env:
  BUNDLE_GITHUB__COM: ${{ secrets.BUNDLE_GITHUB__COM }}
  BREATHE_HR_API_KEY: ${{ secrets.BREATHE_HR_API_KEY }}
  OPSGENIE_API_KEY: ${{ secrets.OPSGENIE_API_KEY }}

on:
  schedule:
    - cron: '0 2 * * 1-5'

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Set up Ruby 2.6
      uses: actions/setup-ruby@v1
      with:
        ruby-version: 2.6.x
    - name: Set up cache
      uses: actions/cache@preview
      with:
        path: ./vendor/bundle
        key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
        restore-keys: |
          ${{ runner.os }}-gem-
    - name: Install dependencies
      run: |
        gem install bundler
        bundle install --jobs 4 --retry 3 --path ./vendor/bundle
    - name: Carry out a dry run
      run: |
        bundle exec rake collie:import:dry_run
    - name: Import absences
      run: |
        bundle exec rake collie:import:run

Hi @pezholio,

A connection reset by peer message means that the site you are connected to has reset the connection. This is usually caused by a high amount of traffic on the site, but may be caused by a server error as well.

I copied your code and tried on my side, it works fine. I notice there are two incidents reported last week (please check github status site for the details), both are fixed now.

Please check again.

Thanks.
Note: if the issue persists, please provide workflow logs to further investigation.

Ah cool, thanks for that. As it goes, last night’s run actually worked for the first time since the original failure. I’ll keep an eye on it and update the issue with logs if it happens again.