Open noraj opened 4 years ago
@lucascaro ?
interesting, I have not experienced this before, what is the root cause? is it a network issue causing the timeout and thus causing a problem when not all files are synced? or is it a code issue?
A code issue. The files synced were random between two command. Like if all assets were copied except some HTML file in _post. But it was maybe caused by one of the outdated dependency. Can you now release a new version and publish it on npm so I can try again and see if it still happens after the sftp-sync-deploy upgrade.
I'm waiting for #6 to test if #3 fixed this (#2)
Update: I still have the bug after v0.3.0 and #7 fix. I also tried with the beta v0.8.0
instead of v0.7.1
of the dependency sftp-sync-deploy
Update2: with sftp-sync-deploy
v0.7.1 or v0.8.0 it fails with forceUpload: true
and forceUpload: false
.
@noraj I just published a new version (v0.4.0
that uses sftp-sync-deploy v0.8.0
) you can try that one, and I also made concurrency
a parameter so you may try setting that to a lower value in case that might be causing problems for you
make that 0.4.1
XD
Yeah the issue is definitely upstream in sftp-sync-deploy
, it happens when using forceUpload: true
. I already tried with v0.7.1 and v0.8.0. So moving to v0.8.0 won't fix it. I'm not impacted anymore as I moved to forceUpload: false
now. To fix it there is nothing to do be wait for upstream to fix and release a new version.
So with hexo-deployer-sftp 0.3.2 and forceUpload: false
I have no timeout anymore.
update: with hexo-deployer-sftp 0.4.1 and forceUpload: false
I still have timeout. It may not be due to forceUpload
but to too many ssh key loaded in the ssh agent because when I try to ssh manually I get Too many authentication failures
error, see https://serverfault.com/questions/36291/how-to-recover-from-too-many-authentication-failures-for-user-root. I created an upstream issue: https://github.com/dobbydog/sftp-sync-deploy/issues/18
I had this problem too although I could not get it fixed by editing the ssh server config. In the end I realized that rsync (hexo-deployer-rsync
) could get me a nearly identical (and even faster) setup (using ssh with a key).
使用 hexo-deployer-sftp@0.4.1
后仍然遇到了这个问题,经测试只有第一次上传会遇到该问题(等待超时),之后的上传正常。
或者设置 concurrency: 50
可以解决该问题。
Often the hexo deployment command randomly timeout before completing, so not all files are synced.
Config: