Hi,
I have a Python script that I run overnight to republish map services on our standalone ArcGIS Server site.
Our main public facing mapping website gets used around the clock and if it is getting too much use when the script runs, it fails with the following errors:
Error message: ERROR 001369: Failed to create the service.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (UploadServiceDefinition).
Sometimes I can simply set the scheduled task to run the script again the following night and it works. However, recently I tried several days on the trot at different times of the night and I just couldn't get it to work.
If anyone else comes across a similar issue, I thought it might help to know how I have (finally) resolved this. The trick is to rename the map service, thus ensuring no-one is sending it requests while it republishes, and then rename it back again.
This has resolved something that has been a bit of a headache for me for a while. I didn't even know there WAS a renameService command hiding in the administrator directory!
Hope that helps,
Sarah
Cornwall Council