sector119 wrote:
>
> I use sqlalchemy 0.6 and psycopg2 2.0.13.
>
> When I try to copy from some little file it's ok, when from some
> bigger one I got error and log posted below.
> When I use pgbouncer and pass poolclass=pool.NullPool to create_engine
> everything wor perfect with large file too.
>
> My query is:
>
> session.connection().connection.cursor().cursor.copy_from(f, table,
> sep=chr(int(conf['import.separator'])), columns=map(str, fields.split
> (',')))
copy_from() probably creates some state that is not compatible with the
connection being used afterwards for subsequent operations, or
alternatively copy_from() is not compatible with some previous state.
The pool does nothing special to the connections which it stores except
calling rollback() when they are returned.
If you can try to isolate the issue to an exact sequence of events (i.e.,
don't use a Session or ORM - just use an engine and connect()) that would
reveal more about what's going on.
>
> Log:
>
> 2009-11-04 18:43:30 EET LOG: statement: COPY people
> (id,street_id,building,corpus,appartment,block,last_name,hd,residents,space,rooms,privilege,comment)
> FROM stdin WITH DELIMITER AS E' '
> 2009-11-04 18:44:08 EET LOG: could not receive data from client:
> Connection reset by peer
> 2009-11-04 18:44:08 EET CONTEXT: COPY people, line 6146
> 2009-11-04 18:44:08 EET STATEMENT: COPY people
> (id,street_id,building,corpus,appartment,block,last_name,hd,residents,space,rooms,privilege,comment)
> FROM stdin WITH DELIMITER AS E''
> 2009-11-04 18:44:08 EET LOG: incomplete message from client
> 2009-11-04 18:44:08 EET CONTEXT: COPY people, line 6146
> 2009-11-04 18:44:08 EET STATEMENT: COPY people
> (id,street_id,building,corpus,appartment,block,last_name,hd,residents,space,rooms,privilege,comment)
> FROM stdin WITH DELIMITER AS E''
> 2009-11-04 18:44:08 EET ERROR: unexpected EOF on client connection
> 2009-11-04 18:44:08 EET CONTEXT: COPY people, line 6146
> 2009-11-04 18:44:08 EET STATEMENT: COPY people
> (id,street_id,building,corpus,appartment,block,last_name,hd,residents,space,rooms,privilege,comment)
> FROM stdin WITH DELIMITER AS E''
> 2009-11-04 18:44:08 EET LOG: could not send data to client: Broken
> pipe
> 2009-11-04 18:44:08 EET LOG: could not receive data from client:
> Connection reset by peer
> 2009-11-04 18:44:08 EET LOG: unexpected EOF on client connection
> 2009-11-04 18:44:08 EET LOG: disconnection: session time: 0:00:44.763
> user=eps database=eps host=localhost port=44257
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---