Set the max bytes per packet for an input stream

Hi,
I got this problem:
I want to store some images into a DB. Now if the images are huge, the DB told me, that the packet size is too large
maybe like that : 'Packet for query is too large (1668641 > 1048576)'
I use an ByteArrayInputStream for the transmission to the DB.
So if I am not able to set the max. packet size of the DB is it possible to cut the input stream into pieces to send them to the DB ?
regards,
Olek

None of this makes any sense.
The MySQL driver will be using TCP to talk to the database server. TCP is a stream oriented protocol. You can't control the size of the packets (other than the maximum by frigging with OS settings - don't do that). Neither can the server detect the sizes of incoming packets. It just sees a stream of bytes and has no idea where the write() boundries are or how the TCP protocol split that into IP packets - it's just a stream of bytes arriving in the same order they were sent.
And... the max TCP segment size is nowhere near 32Mb, so that doesn't make any sense eeither.
So, I conclude (especially in light of the answer about the config settings) that "packet" is a badly abused term by MySQL that allows it to limit the size of individual requests in order to provide some kind of protection against badly written clients and/or malicious attacks. If you need to send more data than this, just up the limit - especially if this is an intranet application where the client is under your control and attacks are unlikely.

Similar Messages

  • Is it feasible to set the rows displayed per page dynamically?

    Hi,
    Is it feasible to set the rows displayed per page dynamically in the table view result as per the user wants eg : the user wishes to see only 25 records or all the records?
    Also what is the maximum limit of rows that can be fetched as per the entry in instanceconfig.xml :
    <ResultRowLimit>65000</ResultRowLimit>
    Is there a limit for number of rows being displayed in table view?
    thanks
    Rishabh

    See this
    How to increase default  number of rows dspalyed ?
    This is your thread only...

  • How u will set the external parameters like packet size and number

    How u will set the external parameters like packet size and number of parallel process.

    Dear Karthik,
    <b>ALE:</b>    
    Use Transaction UPSC02         -      ALE Distribution Unit: Packet Types.
    Performance Optimization for <b>ODS</b> Objects:
    To ensure a good ODS object loading performance, take the following into account:
           1.      Creating SIDs
    The creation of SIDs takes a long time and can be avoided in the following cases by:
           Not setting the indicator for BEx Reporting if you are using the ODS object only as a data store. If you do set this indicator, SIDs are created for all new characteristic values.
           If you use line items (for example, document number or time stamp) as characteristics in the ODS object, in the characteristic maintenance, indicate these as Attribute Only.
    SIDs are created in parallel if <b>parallel activation</b> is switched on (see last point). They are then created with the same number of parallel processes as created for the activation.
    However, if you specify a server group or a special server in customizing, these specifications are not only valid for the activation, but also for the SID creation. The creation of SIDs runs on the application server on which the batch job also runs.
           2.      DB partitioning in active data tables (technical A table)
    By partitioning by database level, you can delete data from the ODS object much more quickly. As a partitioning criterion, choose the characteristic by which you want to delete.  For more information on partitioning database tables, see the database documentation (DBMS-CD). Partitioning is supported by the following databases: Oracle, DB2/390, Informix.
           3.      Indexing
    Use selection criteria for queries for ODS objects. If the key fields are specified, the existing primary index is used. The more frequently accessed characteristic should appear on the left-hand side.
    If you did not specify the key fields completely in the selection criteria (visible in the SQL trace), you improve the run time of the query by creating additional indexes. You can create these secondary indexes in the ODS object maintenance.
           4.      Activation of data in an ODS object
    To improve system performance when activating data in the ODS object, you can make the following entries in Customizing under SAP Customizing Implementation Guide -> SAP NetWeaver -> Business Information Warehouse -> General BW Settings ->  ODS Object Settings:
           the maximum number of parallel processes when activating data in the ODS object as when moving SIDs
           the minimum number of data records for each data package when activating data in the ODS object, meaning you define the size of the data packages that are activated
           the maximum wait time in seconds when activating data in the ODS object. This is the time when the main process (batch process) waits for the dialog process that is split before it classifies it as having failed.
           the server group that needs to be used when activating the data in ODS objects in parallel You have to create the server groups beforehand using the following path: Tools -> Administration -> Network -> RFC Destination, RFC -> RFC Groups. If you do not specify anything here, then the activation runs on the server on which the batch process was started for activation. If a server from the server group is not active, then the activation is cancelled.
           5.      Loading unique data records
    If you only load unique data records (meaning data records with nonrecurring key combinations) into the ODS object, then the loading performance is improved when you set the indicator Unique Data Records in the ODS object maintenance.
    The records are then updated more quickly because the system no longer needs to check whether the record already exists. You do have to be sure that there duplicate records are definitely not being loaded, because this will lead to termination.
    Regards,
    Naveen.

  • Flooded with error: Table RequestUsage_PartitionX has 442892288 bytes that has exceeded the max bytes 442857142

    Hi all,
    Since last week my 2013 farm (3 WFE, 3 App server, SQL 2012) application event log flooded with error every 5 minutes.
    Table RequestUsage_PartitionX has 442892288 bytes that has exceeded the max bytes 442857142. 
    I have google the error and only found Steve Mann's blog discussing about this.  Yet there is no additional information in terms of how to fix it.  Just wondering if anybody has seen this and know how to fix it? 
    Appreciate any suggestion and thanks in advance.
    Sally

    Hi  Sally,
    Thank you for your posting!
    For your error, it is coming from the Usage Infrastructure. The root cause is that your SharePoint Server  usage data is exceeding the daily partition size for the logging DataBase.
    For more detailed information, you can refer to the blog:
    Blind spots in Usage file and Web Analytics Reports
    Thank you for your understanding and support.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Microsoft Intune was unable to set the desired mobile device policy for one or more users due to the following error: A2CE0100

    Hi!
    We have fatal or critical error message on Microsoft Intune Portal but all agents are working just fine. Before opening support ticket we would like to hear comments from the experts on this forum. We would also like to fix this error before starting to
    manage mobile devices with Intune.
    Error message on Intune Portal:
    "Microsoft Intune was unable to set the desired mobile device policy for one or more users due to the following error: A2CE0100"
    Repeated: 19 times.
    Class: (System) Policy
    Random Fatal error message on C:\Program Files\Microsoft\OnlineManagement\Logs\PolicyAgent.log found from one Windows 8.1 client:
    2015-02-21 08:49:20:704 2852 1ab0 FATAL: DocumentProvider::IndicateToConsumer/pp->ProcessPolicies(NULL, NULL, NULL, NULL) failed with error 0x800704d5.
    That said, we are not facing any specific problem but we would like to find symptom of this repeating error message on Intune Portal . We would appreciate to get any thoughts about this case.
    Br.
    Jukka

    Hi Jukka,
    Mobile policy doesn't apply to clients using the Full Client download.  Please open a support case so the team can assist in further troubleshooting.
    Thanks,
    Jon L. - MSFT - This posting is provided "AS IS" with no warranties and confers no rights.

  • MN05: setting the number of printer copies for the whole range of vendors

    Hi all,
    by t.code MN05 I can set the number of copies of the MM documents printed the FIRST TIME. I can do it for doc.type or vendor.
    I can't set the number of printer copies for the whole range of vendors. Should I do it for each one of them?
    Thanks
    Gandalf

    Unfortunately,
    setting for document type, it doesn't work for all range of vendors.
    Setting for document type, in the field "PartF" I've put in "OA". Could it depend on it?
    you do for document type and then it will cover all range of vendors.
    If you want prints for a specific vendor then set condition recrod for that vendor only.
    regards

  • Without to change the setting.how to set the decimal place to 7 for an UDF.

    Without to change the setting, how to set the decimal place to 7 for an UDF?

    Hi
    Once you create a UDF it will automatically be binded to the data source of data type that you gave at the time of creating UDF.
    So i think you can not set the decimal places without changing the setting in display parameters.
    i am not sure whether it will work or not one thing you can try is that create it as a alphanumeric data type and convert your decimal value to sting and then assign it to UDF,While retrieving for any manipulation you convert it as decimal.
    Hope it helps you
    Regards
    Vishnu

  • How I can set the spelling language in Pages for iPad?

    how I can set the spelling language in Pages for iPad? may for german...

    how I can set the spelling check to other language in Papers/iPad?
    The only choices you have in the iPad itself are to change the keyboard or change the user interface language. If that doesn't do what you want, probably best ask the people who make Papers.

  • Why can't I set the Date format in English for Malaysia Region for my iPhone and iPad?

    Why can't I set the Date format in English for Malaysia Region for my iPhone and iPad?

    Apple should change the settings to Malaysia -> Malay / English / Chinese / Tamil

  • Is there as way to set the Status Byte, other than ibrsv?

    I am trying to emulate an instrument that sets the status byte to 64, but does not assert the SRQ line. Using ibrsv asserts SRQ, which seems to cause problems with my legacy test system. I am using LabWindows/CVI under Windows NT and a PXI-GPIB.

    Hi,
    According to the IEEE 488.2 standard, bit 6 of the status byte register (value 64 or 0x40 hex) indicates that the instrument is requesting service. Usually setting this bit will automatically assert the SRQ line. The NI-488.2 does not provide a function that just set this bit without the interface asserting the service request line.
    DiegoF.

  • How can I set the maximum number of restarts for my PDF files?

    I want sent my PDF to a friend,but I just allow him see it only twice.
    How can I set the maximum number of restarts for my PDF files?
    My software edition is Acrobat X

    In the old days when PDFs were only opened on desktops and only in Acrobat or Reader, scripting could fake security features and people were generally convinced. As there are so many ways to open a PDF without scripts ever being run (from mobile devices to in-browser display, or simply opening the file in Illustrator), none of that works anymore.

  • I have lightroom.  My photos are stored on an external disk drive with a backup disk.  With iCloud, will all of my photos go to the cloud?  Will I still need the external drives? Is the $9.99 per month for just one year or for always?

    I am an amateur photographer and have lightroom.  My photos are stored on an external disk drive with a backup disk.  With iCloud, will all of my photos go to the cloud?  Will I still need the external drives? Is the $9.99 per month for just one year or for always? 

    If the iTunes database files are on that drive, launch iTunes with the Shift key(Windows) or Option key(Mac OS X) held down, select Choose Library, and navigate to it. The computer may need to be authorized to play protected content, and if the library contains rented movies, those won't play.
    If not, import the content to an iTunes library.
    (100371)

  • Table RequestUsage_Partition14 has 445538304 bytes that has exceeded the max bytes 442857142

    Dear All,
    Since last 4 weeks my SharePoint 2013 Farm facing Error in Event Ever such as "Table RequestUsage_Partition14 has 445538304 bytes that has exceeded the max bytes 442857142"
    Kindly do let me know how we can resolve this issue.
    Thanks in Advance.
    Pravin Dhulap

    Hi All,
    I have updated the below script on our test Environment and i am not bale to see this error in Error log.
    add-Pssnapin Microsoft.SharePoint.PowerShell
    $UsageDefinition = Get-SPUsageDefinition -Identity "Page Requests"
    $UsageDefinition.MaxTotalSizeInBytes = 21884901888
    $UsageDefinition.Update()
    and i have used smae script on PROD server but the i am still receiving same error.
    Kindly let me know if there are any settings needs to be done or not??
    Kindly provide the solution if anyone of you has it.
    Thanks.
    Pravin Dhulap

  • How do I set the shortcut to space bar for the hand tool in illustrator cc?

    How do I set the shortcut to space bar for the hand tool in illustrator cc?

    Thanks Larry, Mavericks OS. I managed to fix it by quitting Illustrator and reopening it. I have no idea why there was a problem in the first place, it just stopped working with the space bar shortcut and replaced it with a random alphabet.

  • How to find the cpu usage per query for a time period

    Hi All,
    Is there a way to find the cpu used per query for a given time period?
    DB:10.2.0.5
    OS:AIX
    Thanks

    user13364377 wrote:
    if there are multiple queries starting at the same time, then what to do?Handle:      user13364377
    Status Level:      Newbie (10)
    Registered:      Jul 5, 2010
    Total Posts:      264
    Total Questions:      113 (84 unresolved)
    why so many unanswered questions?
    clarify your question
    same SQL multiple times from different sessions?
    or
    different SQLs from different sessions?

Maybe you are looking for