I have a bash script which executes a php code and sleeps for 60 seconds and repeat same thing again
The php code does some json parsing and run bash scripts with shell_exec
I know bash inside php inside bash seems like not a best way..lets say it's for convenience.
Now the inside bash script has some sed commands and some of these sed commands sometimes throws the below errors, even though I don't see they are failing as the results are fine.
sed: couldn't write 24 items to stdout: Broken pipe sed: couldn't write 30 items to stdout: Broken pipe sed: couldn't write 1 item to stdout: Broken pipe sed: couldn't write 34 items to stdout: Broken pipe
I couldn't undertand why sed couldn't write those n items. It shouldn't be disk space issue as there is plenty.
And I don't think this is file descriptors issue too, as the current soft limit 1024 should be more than enough for these scripts. But is there any way to check if the process has reached the file descriptor limit when it threw the error?
Or any suggestions/ideas what could cause this error?