SMB Upload takes forever
I have TeamCity 2017.1 build 46553.
One of my projects is a React app, and I have set it up to publish the results to a web-server when it is done building.
I am using the SMB Upload tool to upload it to a windows server.
The Target URL is: \\10.36.155.19\_rewrite\_Development
Under the credentials, I have entered in a Domain username and password.
The total size of the build is about 4.5 MB. It is taking over 25 minutes to upload to this server, however.
When I log into the Team City server and do the same thing using Windows Explorer, it takes 10-15 seconds.
What is going on? Is there anything I can change? I found some documentation on the old SMB Upload plugin, but now that it is built into Team City I am not sure it is the same, and I am not sure where to find these settings.
Thank you in advance for any advise.
Please sign in to leave a comment.
Hi,
first, the upload doesn't happen from the TeamCity server, but from the TeamCity agent's process. While they might be installed on the same computer, it is often the case that they aren't. Make sure no firewalls, network applications or antivirus are slowing down the process.
The latest documentation to our SMB Upload is here: https://confluence.jetbrains.com/display/TCD10/SMB+Upload. I cannot know whether the settings you mention are available as you didn't provide the link you had found. Some older documentation is available here https://confluence.jetbrains.com/display/TW/Deployer+plugin, and yes, most of the options are still available.
During development of the plugin, this issue was posted: https://github.com/JetBrains/teamcity-deployer-plugin/issues/53. As the code for the plugin is open source, you might be able to check it out as well and try whether you could use the solutions posted in the issue help for your case.
Denis, thank you very much for your reply.
In our case, the TeamCity Agent is on the same server as TeamCity.
I have logged into the machine with the same credentials the Team City Agent uses, and used File Explorer to copy the files to the same location, and it took about 15 seconds.
By the time all was said and done, it took the Team City Agent 61 minutes (I wrote the post in the middle of it transferring files).
Here is the entry from the Build Log:
The thread I was looking at was very much like the one you listed here:
https://github.com/JetBrains/teamcity-deployer-plugin/issues/53
However, it did not list the location of the wrapper.conf file. Looking at the wrapper file, it has the following values:
# Application parameters.
wrapper.app.parameter.1=jetbrains.buildServer.agent.StandAloneLauncher
wrapper.app.parameter.2=-ea
wrapper.app.parameter.3=-Xmx512m
# The next line can be removed (and the rest of the parameter names MUST BE renumbered) to prevent memory dumps on OutOfMemoryErrors
wrapper.app.parameter.4=-XX:+HeapDumpOnOutOfMemoryError
# Preventing process exiting on user log off
wrapper.app.parameter.5=-Xrs
# Uncomment the next line (insert the number instead of "N" and renumber the rest of the lines) to improve JVM performance
# wrapper.app.parameter.N=-server
wrapper.app.parameter.6=-Dlog4j.configuration=file:../conf/teamcity-agent-log4j.xml
wrapper.app.parameter.7=-Dteamcity_logs=../logs/
wrapper.app.parameter.8=jetbrains.buildServer.agent.AgentMain
# TeamCity agent parameters
wrapper.app.parameter.9=-file
wrapper.app.parameter.10=../conf/buildAgent.properties
I have gone ahead and changed the SMB Upload settings for this build step, and checked "Use DNS Only Name Resolution". When I ran it this time, it took 1 minute and 12 seconds. That is awesome!
Thank you for your help. I have no idea why the DNS Only Name Resolution would make such a difference, but it does. When I was setting up the step, I didn't see this option as Advanced Settings were not visible. I was able to find it in the Advanced Settings though.
Thanks again for your help. I will update this ticket if this becomes an issue again.