Обсуждение: pq_flush: send() failed: Broken pipe
I just upgraded from 7.2 to 7.3.1. I have a cron job that runs each night, doing vaccum and analyze, and it was running just fine untill the upgrade.
I can run these commands just fine from the command line as both the root and postgres users, but in my cron job it spits out the error "pq_flush: send() failed: Broken pipe".
What could I be doing wrong?
Thanks
Chad
Here are the commands
0 23 * * * psql mydb -U postgres -c "vacuum full;"
0 0 * * * psql mydb -U postgres -c "analyse;"
0 0 * * * psql mydb -U postgres -c "analyse;"
Chad, > I just upgraded from 7.2 to 7.3.1. I have a cron job that runs each night, > doing vaccum and analyze, and it was running just fine untill the upgrade. > I can run these commands just fine from the command line as both the root > and postgres users, but in my cron job it spits out the error "pq_flush: > send() failed: Broken pipe". > > What could I be doing wrong? I've seen that error before on my system, and it was because another system task was interrupting postgresql. Are you sure you didn't change anything else on the machine? -- Josh Berkus Aglio Database Solutions San Francisco
>I've seen that error before on my system, and it was because another system >task was interrupting postgresql. Are you sure you didn't change anything >else on the machine? Ive done no other changes on the machine. Upon closer inspection however, the other item I have in cron doesnt run either. I guess I'll blame cron being on the fritz and reinstall it. Dont know what could have changed though. Very wierd If you get any other ideas, Id love to hear them. Thanks Chad
> Chad,
>
> > I just upgraded from 7.2 to 7.3.1. I have a cron job that runs each night,
> > doing vaccum and analyze, and it was running just fine untill the upgrade.
> > I can run these commands just fine from the command line as both the root
> > and postgres users, but in my cron job it spits out the error "pq_flush:
> > send() failed: Broken pipe".
> >
> > What could I be doing wrong?
>
> I've seen that error before on my system, and it was because another system
> task was interrupting postgresql. Are you sure you didn't change anything
> else on the machine?
>
>
> > I just upgraded from 7.2 to 7.3.1. I have a cron job that runs each night,
> > doing vaccum and analyze, and it was running just fine untill the upgrade.
> > I can run these commands just fine from the command line as both the root
> > and postgres users, but in my cron job it spits out the error "pq_flush:
> > send() failed: Broken pipe".
> >
> > What could I be doing wrong?
>
> I've seen that error before on my system, and it was because another system
> task was interrupting postgresql. Are you sure you didn't change anything
> else on the machine?
>
I have found that the job IS running, just not outputting to the logs.
I do a ps -ef and there it is vacuuming the database.
It throws and error when it starts ( pq_flush: send() failed: Broken pipe ) and when it finishes (LOG: pq_recvbuf: unexpected EOF on client connection)
Does that give anyone any ideas what could be wrong?
My current command is
0 23 * * * psql weblink -U postgres -c "vacuum full verbose;"
TIA for any ideas
Chad