Skip to content

Better timeout support: .ftp-deploy-sync-state.json model / early generation, number of files / folders to sync... #34

Description

@DamChtlv

I'm having an issue where after some time creating folders / files, the action stop working (seems to freeze) and finally resolve to this: Error: Timeout (control socket)

My config:

- name: 📁 Sync files
      uses: SamKirkland/FTP-Deploy-Action@v4.3.4
      with:
        server: XXX
        username: XXX
        password: ${{ secrets.PREPROD_FTP_PASS }}
        local-dir: ./wp-content/themes/val/
        server-dir: ./autodeploytest/
        timeout: 150000

Log representation:

----------------------------------------------------------------
🚀 Thanks for using ftp-deploy. Let's deploy some stuff!   
----------------------------------------------------------------
If you found this project helpful, please support it
by giving it a ⭐ on Github --> https://github.com/SamKirkland/FTP-Deploy-Action
or add a badge 🏷️ to your projects readme --> https://github.com/SamKirkland/FTP-Deploy-Action#badge
----------------------------------------------------------------
No file exists on the server "./autodeploytest/.ftp-deploy-sync-state.json" - this must be your first publish! 🎉
The first publish will take a while... but once the initial sync is done only differences are published!
If you get this message and its NOT your first publish, something is wrong.
----------------------------------------------------------------
Local Files:	340
Server Files:	0
----------------------------------------------------------------
Calculating differences between client & server
----------------------------------------------------------------

📁 Create: ... (a lot)
📄 Upload: ... (a lot)

----------------------------------------------------------------
Making changes to 340 files/folders to sync server state
Uploading: 4.97 MB -- Deleting: 0 B -- Replacing: 0 B
----------------------------------------------------------------

creating folder "..." (some)
uploading "..." (some)

...then at one point, it freeze here i don't know why...
and after the specific timeout, it finally resolve to this:

----------------------------------------------------------------
--------------  🔥🔥🔥 an error occurred  🔥🔥🔥  --------------
----------------------------------------------------------------

----------------------------------------------------------------
----------------------  full error below  ----------------------
----------------------------------------------------------------

Error: Timeout (control socket)
    at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.4/dist/index.js:5288:33)
    at Object.onceWrapper (node:events:627:28)
    at Socket.emit (node:events:513:28)
    at Socket._onTimeout (node:net:550:8)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)
Error: Error: Timeout (control socket)

The problem is that it starts over from the beginning if i trigger it again, so zero progress.
I tried changing default timeout value from 120000 to 15000, but it always result in timeout error.

It would be nice to have an option to create .ftp-deploy-sync-state.json before a timeout occurs so it can actually make progress (like one second before set timeout)
Or to be able to set a number of files / folders to sync so it stops after this number and generate .ftp-deploy-sync-state.json to store progress.
Or even have a .ftp-deploy-sync-state.json model / template, so we can see how it is structured and create it ourselves on the server so it can resume where it stopped previously

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions