Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6863993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:51:22+00:00 2026-05-27T02:51:22+00:00

I’m trying to sync a mssql database (hosted at the customer office) with the

  • 0

I’m trying to sync a mssql database (hosted at the customer office) with the mysql database that is on the hosting platform where there’s the customer’s website.

I’ve already got to synchronize three of the four table(structure and data) of the database successfully.
Troubles come when I attempt to sync the 4th table which has about 2300 records with 2 BLOB fields with the images of each product.
The first thing I’ve tried was a

SELECT * FROM chunkyTable

but many timeout were fired (despite I set the “mssql.timeout” to 7200.

So I set up a paginated synchronization which read 10 records each query and insert them into the mysql database.

Everything works smoothly for the first 150 records.
From the log I make I can see that for the first 15 pages , synchronizing 10 records takes about 2 up to 6 seconds (consider that from the website I connect to the mssql server which is connected with a common ADSL which constitute a quite big bottleneck).
From the 16th page on the time required for synchronizing the 10 records rises up to 5:30 seconds.
I thought at first that this was due to the fact that the first 150 records don’t have any image stored, so I checked what was inserted into the mysql and I discovered that nothing was inserted!

These led me to think that maybe mysql has some limits on the lenght of the argument passed to the mysql_query() function.
The way the query is composed is:

INSERT INTO chunckyTable(field1,field2,...fieldN)
VALUES (val1,val2,val3,...,valN),(val4,val5,val6,...,valM),

and so on

repeated for 10 records.

Do you know if there are some limitations on the maximum length on the sql string passed to mysql_query function (I had a look to the phpinfo() output but there isn’t any configuration about this topic)?

Do you have any similar experience with this kind of synchronization?
Any help would be really appreciated!

Thanks,
Luke

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:51:22+00:00Added an answer on May 27, 2026 at 2:51 am

    I found what was firing the error.
    Actually there were 2 things.

    1. I was composing the query this way $query=”\””.mysql_real_escape_string($val).”\”” but the \” was letting the query crash.
    2. Mysql @@global.max_allowed_packet on my server is set to 1Mb , but each row contains 2 blob field with ~150Kb image in them. So each row is more than 300Kb since there are also the data of the records and when I was packing the insert of 10 rows in one query I exceeded the limit of max_allowed_packet. To resolve this I insert the row one by one

    Thanks anyway for the advise you gave me!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am trying to loop through a bunch of documents I have to put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.