FAQ: Do service definition files have a size limitation?
Do service definition files have a size limitation?
The size of a service definition file does not have a known limit. Service definition files can include or exclude the data referenced by the GIS resource, which affects the overall size of the file. When disconnected from the server, service definition drafts can be created and published at a later time. The file size of service definition drafts is affected in the same manner.
The best practice is to register all possible data sources with ArcGIS for Server if the user does not want the service definition file to include the referenced data.