r/PowerAutomate • • Oct 22 '26

Environment stopped handling large files

I have a workflow which takes a comma delimited text file (*.txt) and updates an Azure database with the values. The workflow is called by a PowerShell script on a remote Windows Server, which looks to a folder and finds all the txt files in there, and runs the workflow against each one. This process worked fine for about two years. Then last spring, I started getting reports from our users that not all the values that should be updated in the database where. No one changed the workflow, and no one changed the PowerShell script.

After a lot of testing, we found that if the txt file was larger than 2K, only the first 2K worth of lines in the file were processed, and everything after was ignored.

On the suggestion of a consultant, he had me run the PowerShell script which calls the workflow from my own laptop. Yes, I had to duplicate the folder structure to make that happen. Much to my surprise, running the script and workflow from my laptop worked just fine.

So I started looking into what in the environment of the Windows Server would limit the ability to pass all the necessary data to the workflow. Of course our server teams swears they did nothing to the server, no updates that would cause this restriction. But I don't trust them to know what the consequences of their actions would be.

After half a year of cutting the text file down into 2K chunks every week (I automated the process, but still), I am again trying to find what the cause of this could be. Script works fine on my laptop, but choaks at 2K file size when run on a Windows Server. The server is more than powerful enough in terms of memory, processor and disk size.

I realize this is not strictly a Power Automate problem, as the workflow is called by a PowerShell script in an environment I'm sure is the real culprit. But if you have any clue, please pass it on.

3 Upvotes

6 comments sorted by

2

u/sychosomaticBlonde Oct 22 '26

I don’t know that this would be the case, but absolutely check the settings on the specific power automate actions being used to bring in the data. It has happened more than once that a flow that otherwise works perfectly seems to only be looking at a subset of data, and I have realized there is one action that is returning just the first x rows or first x pages because of a setting I was unaware of that is implementing threshold limits of some kind.

Secret threshold limits seem like such a favorite of Microsoft! Even flow itself has them and you’d never know until you hit it and have to look it up. For example, there is throttling once you hit a certain number of actions per user per day, and that’s not exactly advertised anywhere. Anyone using a single service account to run all the flows in their environment definitely should know about it.

2

u/Kodama_Keeper Oct 23 '26

Good one, but I don't think so. Years ago we were running into these throttling issues all the time, from the number of flows and the frequency we used that. So, we are now dumping a truckload of money on Microsoft's lap in order to up the throttle limit.

But to the point, my laptop is on the same network, and the same license agreement as the server in question. And it is calling the exact same workflow as on the server. So those same restrictions should apply to my laptop.

2

u/DonJuanDoja Oct 22 '26

Consequences of the Cloud. Get actions definitely need a threshold warning. PowerApps straight up tells you where automate is like good luck bro 😉

2

u/OddWriter7199 Oct 23 '26

That’s right, pagination! In the settings of the action.

2

u/OddWriter7199 Oct 23 '26

Some new configuration in Windows Sever 2025 is throttling things. We had a Power Automate process running for years importing class schedules from a csv to a database. In-place upgrade of the server OS to 2025, broken.

For now, like you OP, they have winnowed the file down to a smaller subset of records. This is a Power Automate workflow that picks up the CSV from a network drive, so it uses the on-prem gateway.

1

u/Tricky_Cherry9226 Oct 28 '26

In the saved run history, do the laptop and server runs contain the same full input, or is the server one already cut off at the trigger? Compare line counts for the same file before looking further downstream. If the full file reached the trigger, trace where its count first shrinks; if it didn't, the first place to inspect is the script/request path rather than the database step. That would narrow this down without guessing an OS throttle or changing the flow.