SharePoint 2010 workflow fails to associate when too long

SharePoint workflow limitations - won't associate - I have a long workflow (37 pages long) about  80 workflow variables, but the files are all less than 600KB (well below the 5M limit).
I reduced the number of workflow variables and that helped but still this problem if I try to add too much logic.
When I add additional statements sometimes the workflow fails association when attempting to publish.  However, when I take out those statements, it publishes fine.  
It doesn't seem to be dependent on what I add - even a simple log statement can cause this problem.  I'm not running into the limit of steps or how nested things are from my reading of the MS documentation.  Impractical to split this into 2 (or more) workflows as would take a lot of coordination between them to prevent inappropriate cross-triggering (they would both need to modify the record and are set to run on modification).
Environment :  SP 2013 with ONLY SP 2010 workflows, Full control only - no SCA, no support from farm admins - cannot change anything at farm level.
Keyboard CowboyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shaun VermaakTechnical SpecialistCommented:
Can you not split into multiple smaller workflows looking at a status column?
Keyboard CowboyAuthor Commented:
Thanks for your comment -
It would be a little involved but possible.  I've given that a lot thought but always can learn. Critical that the two (or three) Wfs run in order and the wait on a field to change is not reliable in 2013.  Also critical that these execute to completion and I have problems with 'failed to start' on this server  - i get a failed to start every150 workflow executions and there are hundreds a day.  if the workflow could even run at the same time - they could end up with save errors as they both have to modify the record.  I've looked closely at using an aux list - creating a record there - with a workflow to work -  I use that technique for several things that can wait and done later (like reminders)  - that works well (their reminder dates change all the time).  I might be able to find some processing which can wait (like sending out notifications on various things - it has over 25 emails it can send out based on the status column and to various populations.  Not sure that would save a lot - perhaps - Would need to prototype that approach.
I've been able to publish it recently by reducing WF vars and some extra logic that wasn't needed.  but I'm pretty sure I'll run into this again with some major functions I still need to add..
Will give it additional thought if this continues - takes this workflow about 7 minutes to publish (or error out) so progress is close
Customer delighted we could even do this processing so that's good.
Thanks again

I could put in pause in the second workflow - but that would mean at least up to 5 minutes (or more) before the record finshed processing. (pause for 1 min takes 5-10 mins to resume I've learned on this server at least)  - that won't work I don't think.
Walter CurtisSharePoint AEDCommented:
You have been working really hard on this judging by your questions and comments. Too bad this stuff doesn't work as good as one would think it does! I have had a similar situation as the one you describe. Actually, it was a site owner that had hired an outside developer to crate the completed workflow. It never really worked as the site owner thought it would, but most site owners expect the not possible because they don't quite understand IT, so good that your customer is delighted. One backend step that did help tremenously was to increase the workflow throttling. Here is some good MS information about that. I understand that the farm admin may not do this for you, but this article may help them understand how this could help.

Another one;

Here is a good link that explains workflow limits;

Hope that helps, good luck!!!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Keyboard CowboyAuthor Commented:
Hey Walter- thanks (again) for the investigation.  I must had read that workflow limits page from MS about 100 times looking for something.  I'm no where near any of limits so far as I can tell - I"m about 500K workflow files and the limit if 5MB for example.  The discussion on the top link you provided on parellel steps was intersting - I've never really used those in the way they describe.  I have heard that waiting on a field to change can be a lost cause.  Also I have a lot of records and if I used the waiting on a field technique and modify the workflow - I have to manually cancel (no access to powerscript here) and retrigger the workflow on hundreds of items.  So I design my workflow to handle everything in one execution.  If I need to retrigger it - i put a record on an aux list and have the aux list workflow pause for whatever time and then re-run.  So I have a dozen or so workflows running on the aux list - not 150 or more on my primary list.  It's designed so that I can update the aux list workflow and the primary workflow will restart everything (long story on how I do this).  I use this technique for multiple reminders dates which trigger in a complicated way and it seems to work ok.
Oh - I was having problems with the WF starting  - it was taking like 10-15 minutes to get into progress - Turns out if you go to the list settings  - workflows - add/remove a workflow - and see the various workflow versions there - I had one stuck - it showed completed on the list view but actually it was hanging out there.  This was a few hundred lines away from the current version and there are some big deals about # of instances per list/site collection as you linked to .  anyway - canceling out stuck workflows made a big difference in the start times for new executions.  So now i check that display every few days.  Of course, I have an alert on the workflow history to let me know about error/failed to start/canceled workflows and have special pages which summarize the whole WF situation in a dashboard for all of my site workflows  - which has helped greatly especially my backup person!

more importantly, I have another question I posted on triggering a workflow (manual start) with a simple link without showing the initation screen.  Any ideas on that one really appreciated.  The customer wants a pony here but of a certain color - which makes for job security ya know.
Let's see if anyone else has any ideas on my primary question in this thread.  thanks again
Keyboard CowboyAuthor Commented:
Walter CurtisSharePoint AEDCommented:
Sorry I couldn't help more. Have some major deadlines that are pressing.

Thanks for closing the question.

Good luck...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.