Re: Question about max size of a dbrpcparam

"Navdeep Shergill" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
For comparision; here is the last few entries in the LOG for a 3.5mb file

=====================================================================
net.c:779:Sending packet
0000 03 00 02 00 00 00 01 00-3e ec 3e f0 3e f4 3e f8 |........ >.>.>.>.|
0010 3e 15 3f 1c 3f 23 3f 2b-3f 31 3f 37 3f 44 3f 4c |>.?.?#?+ ?1?7?D?L|
0020 3f 51 3f 57 3f 5f 3f 65-3f 6b 3f 71 3f 80 3f 8b |?Q?W?_?e ?k?q?.?.|
0030 3f 95 3f 9e 3f d4 3f dc-3f e3 3f e9 3f f7 3f ff |?.?.?.?. ?.?.?.?.|
0040 3f 00 00 00 60 00 00 6c-00 00 00 05 30 0b 30 14 |?...`..l ....0.0.|
0050 30 1a 30 20 30 27 30 37-30 57 30 60 30 70 30 95 |0.0 0'07 0W0`0p0.|
0060 30 a3 30 b4 30 d3 30 ee-30 fb 30 02 31 0e 31 1b |0.0.0.0. 0.0.1.1.|
0070 31 28 31 2f 31 36 31 3d-31 45 31 4d 31 55 31 5b |1(1/161= 1E1M1U1[|
0080 31 63 31 69 31 6f 31 7c-31 84 31 8d 31 93 31 9b |1c1i1o1| 1.1.1.1.|
0090 31 a1 31 a7 31 ad 31 bc-31 cb 31 e5 35 0b 36 78 |1.1.1.1. 1.1.5.6x|
00a0 39 e7 39 26 3c 8b 3c 31-3d 42 3d fb 3f 00 00 00 |9.9&<.<1 =B=.?...|
00b0 70 00 00 14 00 00 00 66-30 10 31 7e 37 8a 37 90 |p......f 0.1~7.7.|
00c0 37 00 00 00 90 00 00 34-00 00 00 a0 3b a7 3b 2c |7......4 ....;.;,|
00d0 3c 30 3c 34 3c 38 3c 3c-3c 92 3c 99 3c 34 3d c8 |<0<4<8<< <.<.<4=.|
00e0 3d cc 3d d0 3d d4 3d d8-3d 0a 3e 11 3e 78 3e 7c |=.=.=.=. =.>.>x>||
00f0 3e 80 3e 84 3e 88 3e 00-a0 00 00 1c 00 00 00 cf |>.>.>.>. ........|
0100 35 ff 35 37 36 80 38 c4-38 e0 38 1a 39 2b 39 7b |5.576.8. 8.8.9+9{|
0110 39 00 00 00 b0 00 00 14-00 00 00 0b 37 6e 38 36 |9....... ....7n86|
0120 3b 65 3b 67 3c d9 3c 00-c0 00 00 14 00 00 00 77 |;e;g<.<. .......w|
0130 30 d3 37 18 38 a3 3a 06-3b 00 00 00 d0 00 00 10 |0.7.8.:. ;.......|
0140 00 00 00 49 36 6b 36 29-37 bb 37 00 e0 00 00 20 |...I6k6) 7.7.... |
0150 00 00 00 bb 30 cb 30 e4-30 f4 30 fb 30 05 31 d2 |....0.0. 0.0.0.1.|
0160 32 57 36 65 36 13 3a 4f-3b 00 00 00 00 00 00 00 |2W6e6.:O ;.......|
0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01d0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|

util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 03 01 01 7f 00 00 01 00-00 00 00 00 00 00 00 00 |........ ........|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0040 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0060 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0080 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0090 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00d0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0170 00 00 00 00 00 00 00 30-30 30 36 37 30 37 32    |.......0 0067072|

rpc.c:313:dbrpcsend() returning SUCCEED
dblib.c:4532:dbsqlok(013AD618)
net.c:592:Received header
0000 04 01 00 45 01 fd 01 00-                        |...E....|

net.c:671:Received packet
0000 81 01 00 08 01 21 00 26-04 02 69 00 64 00 d1 04 |.....!.& ..i.d...|
0010 97 19 03 00 ff 01 00 c1-00 01 00 00 00 ff 01 00 |........ ........|
0020 e0 00 00 00 00 00 ff 11-00 c1 00 01 00 00 00 79 |........ .......y|
0030 00 00 00 00 fe 00 00 e0-00 00 00 00 00          |........ .....|

dblib.c:4556:dbsqlok() exits on result token 0x81
dblib.c:1599:dbresults(013AD618)
dblib.c:1608:dbresults: dbresults_state is 0 (_DB_RES_INIT)
token.c:495:tds_process_tokens(013ADF10, 00DACF98, 00DACF8C, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  81(TDS7_RESULT)
token.c:1520:processing TDS7 result metadata.
mem.c:563:tds_free_all_results()
token.c:1544:set current_results (1 column) to tds->res_info
token.c:1555:setting up column 0
token.c:1490:tds7_get_data_info:
    colname = id (2 bytes)
    type = 38 (integer-null)
    server's type = 38 (integer-null)
    column_varint_size = 1
    column_size = 4 (4 on server)
util.c:162:Changed query state from READING to PENDING
dblib.c:1630:dbresults() tds_process_tokens returned 1 (TDS_SUCCEED),
            result_type TDS_ROWFMT_RESULT
token.c:495:tds_process_tokens(013ADF10, 00DACF98, 00DACF8C, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  d1(ROW)
token.c:621:tds_process_tokens::SET_RETURN stopping on current token
util.c:162:Changed query state from READING to PENDING
dblib.c:1630:dbresults() tds_process_tokens returned 1 (TDS_SUCCEED),
            result_type TDS_ROW_RESULT
dblib.c:1587:dbresults returning 1 (SUCCEED)
dblib.c:1948:dbnextrow(013AD618)
dblib.c:1961:dbnextrow() dbresults_state = 2 (_DB_RES_RESULTSET_ROWS)
token.c:495:tds_process_tokens(013ADF10, 00DAD070, 00000000, 0x1508)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  d1(ROW)
token.c:2166:tds_process_row(): reading column 0
token.c:1915:tds_get_data: type 38, varint size 1
token.c:1975:tds_get_data(): wire column size is 4
util.c:162:Changed query state from READING to PENDING
buffering.h:231:buffer_transfer_bound_data(013AD620 4040 -1 013AD618 0)
dblib.c:2030:leaving dbnextrow() returning REG_ROW/MORE_ROWS
dblib.c:1948:dbnextrow(013AD618)
dblib.c:1961:dbnextrow() dbresults_state = 2 (_DB_RES_RESULTSET_ROWS)
token.c:495:tds_process_tokens(013ADF10, 00DAD070, 00000000, 0x1508)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  ff(DONEINPROC)
token.c:2201:tds_process_end: more_results = 1
        was_cancelled = 0
        error = 0
        done_count_valid = 0
token.c:2232:                rows_affected = 1
util.c:162:Changed query state from READING to PENDING
dblib.c:2030:leaving dbnextrow() returning NO_MORE_ROWS
dblib.c:1599:dbresults(013AD618)
dblib.c:1608:dbresults: dbresults_state is 3 (_DB_RES_NEXT_RESULT)
token.c:495:tds_process_tokens(013ADF10, 00DACF98, 00DACF8C, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  ff(DONEINPROC)
token.c:2201:tds_process_end: more_results = 1
        was_cancelled = 0
        error = 0
        done_count_valid = 0
token.c:2232:                rows_affected = 0
util.c:162:Changed query state from READING to PENDING
dblib.c:1630:dbresults() tds_process_tokens returned 1 (TDS_SUCCEED),
            result_type TDS_DONEINPROC_RESULT
token.c:495:tds_process_tokens(013ADF10, 00DACF98, 00DACF8C, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  ff(DONEINPROC)
token.c:2201:tds_process_end: more_results = 1
        was_cancelled = 0
        error = 0
        done_count_valid = 1
token.c:2232:                rows_affected = 1
util.c:162:Changed query state from READING to PENDING
dblib.c:1630:dbresults() tds_process_tokens returned 1 (TDS_SUCCEED),
            result_type TDS_DONEINPROC_RESULT
token.c:495:tds_process_tokens(013ADF10, 00DACF98, 00DACF8C, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  79(RETURNSTATUS)
token.c:645:tds_process_tokens: return status is 0
util.c:162:Changed query state from READING to PENDING
dblib.c:1630:dbresults() tds_process_tokens returned 1 (TDS_SUCCEED),
            result_type TDS_STATUS_RESULT
token.c:495:tds_process_tokens(013ADF10, 00DACF98, 00DACF8C, 0x6914)
util.c:162:Changed query state from PENDING to READING
token.c:510:processing result tokens.  marker is  fe(DONEPROC)
token.c:2201:tds_process_end: more_results = 0
        was_cancelled = 0
        error = 0
        done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
dblib.c:1630:dbresults() tds_process_tokens returned 1 (TDS_SUCCEED),
            result_type TDS_DONEPROC_RESULT
dblib.c:1657:dbresults(): dbresults_state is 3 (_DB_RES_NEXT_RESULT)
token.c:495:tds_process_tokens(013ADF10, 00DACF98, 00DACF8C, 0x6914)
token.c:498:tds_process_tokens() state is COMPLETED
dblib.c:1630:dbresults() tds_process_tokens returned 2
(TDS_NO_MORE_RESULTS),
            result_type TDS_DONE_RESULT
dblib.c:1587:dbresults returning 2 (NO_MORE_RESULTS)
dblib.c:3093:dbcancel(013AD618)
query.c:1934:tds_send_cancel: not in_cancel and idle
dblib.c:718:dbloginfree(003F5BA0)
dblib.c:1372:dbclose(003FCE78)
dblib.c:256:dblib_del_connection(10309EF0, 003FD6D8)
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from PENDING to DEAD
dblib.c:303:dblib_release_tds_ctx(1)
dblib.c:5727:dbfreebuf(003FCE78)
dblib.c:718:dbloginfree(003FDB90)
dblib.c:1372:dbclose(013AD618)
dblib.c:256:dblib_del_connection(10309EF0, 013ADF10)
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to DEAD
dblib.c:303:dblib_release_tds_ctx(1)
dblib.c:5727:dbfreebuf(013AD618)
dblib.c:1442:dbexit(void)
dblib.c:303:dblib_release_tds_ctx(1)
==================================================================================


Thanks!

On Wed, Oct 8, 2008 at 11:15 PM, Navdeep Shergill <[email protected]>wrote:

> I tried with v0.82 and the same problem exists. I traced through the code
> and naturally it is spending a lot of time in this function:
>
> write.c -> tds_put_n(TDSSOCKET * tds, const void *buf, int n)
>
> n = 40841216
>
> The block size is 512; so it seems to be putting 512 bytes on the socket at
> a time. I'm wondering if that is the problem; since doing 512 bytes at a
> time of a 40mb file takes a while. One thing to note is that during the 'big
> for loop' thats in that tds_put_n function; the TDSSOCKET->STATE changes to
> TDS_DEAD. Dont know why.
>
> The log file itself is about 200mb; so I really dont have a way to send
> that but here is the last few entries in there
>
> ================================================================
>
> <<Navdeep -> many more net.c779  sending packet>>
> <<Navdeep -> last Packet >>
>
> net.c:779:Sending packet
> 0000 03 00 02 00 00 00 01 00-00 00 00 00 00 00 00 00 |........ ........|
> 0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0040 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0060 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0080 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0090 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00d0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01d0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
>
> util.c:110:logic error: cannot change query state from DEAD to PENDING
> rpc.c:304:returning FAIL: tds_submit_rpc() failed
> dblib.c:3093:dbcancel(013AD618)
> dblib.c:7782:dbperror(013AD618, 20047, 0)
> dblib.c:7835:20047: "DBPROCESS is dead or not enabled"
> dblib.c:4747:dbdead(013AD618) [dead]
> ====================================================================
>
>
> On Wed, Oct 8, 2008 at 3:15 PM, James K. Lowden <[email protected]>wrote:
>
>> Navdeep Shergill wrote:
>> > I am using v0.64RC2 of FreeTDS. I am trying to call a stored proc on
>> > SQL2005 server that takes in a image parameter. Here is my logic..
>> >
>> >             dbrpcparam(ldbproc,"@id",0,SYBCHAR,-1,strID.length(),idB);
>> >             dbrpcparam(ldbproc, "@table"
>> > ,0,SYBCHAR,-1,strTable.length(),focusB);
>> >             dbrpcparam(ldbproc, "@name"
>> > ,0,SYBCHAR,-1,strFileName.length(),nameB);
>> >             dbrpcparam(ldbproc, "@title"
>> > ,0,SYBCHAR,-1,strTitle.length(),titleB);
>> >             dbrpcparam(ldbproc, "@update"
>> > ,0,SYBCHAR,-1,updateFlag.length(),updateB);
>> >             dbrpcparam(ldbproc,"@content"
>> > ,0,SYBIMAGE,-1,numbytes,(BYTE*)memArea);
>> >             dbrpcsend(ldbproc)
>> >
>> >
>> > The image type is being fed with a byte pointer that holds the contents
>> > of a file. This thing works file as long as the file is of a smaller
>> > size. I have tried up to 30mb and it works fine. The problem happens
>> > when I try to pass in files larger than 35mb+.
>>
>> It is quite difficult for me to test this because my test server is on the
>> other end of a DSL line.  And you're using a pre-release version of an old
>> release....
>>
>> If you can confirm the problem still exists in 0.82, post a log file (it
>> will be big!) where I can download it.  We'll see what can be done from
>> there.
>>
>> HTH.
>>
>> --jkl
>> _______________________________________________
>> FreeTDS mailing list
>> [email protected]
>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.