ArcGIS Server Printing Service using Python

Discussion created by on May 22, 2011
I have built a geoprocessing toolbox to export an mxd to pdf using arcPy and it works perfectly well using ArcGIS Desktop. When I publish the geoprocessing tool on ArcGIS Server the service is shown and I can use it by passing the parameters. What is happening is that when I click on submit job, the job tells me that is being executed but never stops until it is timed out. I have also pinpointed the problem but I cannot figure how to solve it. What is causing it are 3 lines in python.

1. Setting the extents of the dataframe
2. Setting the scale of the dataframe
3. Exporting and saving the mxd to pdf.

When I remark these 3 lines the job will eventually stop. I think that it has something to do with permissions. Any help?

The error reported is : crash or termination of the server object