Page request timed out while importint to MySQL - mysql

Hellow
I have list with 30.000 objects that has to import to MySQL (extern location) after 2 min I get following error:
'Request timed out.'
Website where file is upload is hosted on azure.
Thanks

BNILIJST.BLL.Klanten.Update(i, kc.FirmaNaam, kc.BtwNummer, kc.Straat, kc.Postcode, kc.Gemeente, kc.Bni_Klant, kc.Actief, kc.UpdateDate);
This is the insert Statement
With the code is nothing wrong, Exept it can faster but time is not a problem it runs at night.
I want changhe the time of sending request in azure

Related

How to MySQL INSERT with prisma in Next.js API server

I'm really a newbie on DB programming and Next.js also.
I have tried the function that received json data should be INSERTed (MySQL) with prisma in Next.js API server.
According to the explanation of the prisma, the code for inserting new record was as follows.
const result = wait prisma.[db_name].create({data:[json_data_name]});
for the PUT data [json-data_name].
For every http PUT case , the db connection count was added and after about 500 times inserting, there broke out the problem of "Too many connections...".
I think that the number of record inserted is not confined to 500 or..,
I think the prisma function prisma.[db_name].create makes new connection.
How to insert 2000~3000 http PUT data into MySQL db with prisma for Next.js API server?
const prisma = new PrismaClient();
the code above was moved out of the API handler, then the problem was finished!.
for every call of API handler , new prisma was created and used.
it means a new connection to db was created.
Thank you.

Prestashop webapi reset mysql cache by Web API or call SQL by Presta Web Service API

Hi i have problem with Presta WebService. I'm using prestashop with node (nestJS). I Created a connection with MySql database (Presta DB) with SSH tunelling. It works corectly, i can do any query, and SQL returns "OK statuses". I checked it by ssh client, (queries in temrinal) and data is updated in DB. Problem is when i want to select this data by PrestaWebService, when i pick data presta returns "old" propably cached data. On presta Admin i have ceching "off". After manually reset cache by admin panel button keep presta returns me 'old" data. Anyone know whats going on? :D
I found a problem. I used incorrect table. I queried ps_product but should ps_product_shop.

ssis send mail task: Error: An error occurred with the following error message: "The operation has timed out."

SSIS package in question runs a series of stored procedures and fills 13 different excel files with results and sends those excel files to 13 different users in attachments. Package run stops with the message in the title of this question, sometime right in the middle of sending or for example today, on the 4th user. The files get created because I can see them in their directories so only the send mail task is failing. When I go back to visual studio and execute each send task manually, send task works fine even though sometime it still gives me the error yet, still sends the right file to the right person but not thru SSIS package run in SQL server... I tried to delay SMTP processes thinking that might be in the way (to 660000 miliseconds) but did not help. Has this happened to anybody?.. Thanks for all your answers in advance.
Here is the full message for a task that sent the e-mail with attachment regardless the error when task was manually executed...
[Send Mail Task] Error: An error occurred with the following error message: "The operation has timed out.".
Progress: The SendMail task is completed. - 100 percent complete
Task Send Mail Task for Inventory Reports 038 failed
Finished, 12:03:03 PM, Elapsed time: 00:00:00.655
I think I figured it out why this was happening. In case somebody / anybody is interested, here is what I think has happened.
I was trying to expand the timeout period thru a script task, playing with Threading.Thread.Sleep value but I neglected to do the same in my SMTP connection properties. When I changed the timeout value in properties for SMTP connection, error messages stopped coming :)
I wish I could post a picture to show you where exactly that property is located but my reputation failed me!.. :( (less than 10 points yet)
I am in the process of completing all of my changes then I will post again with final result hoping that will resolve all of my problems.
Thanks to all who showed interest.

Can't retrieve file content via download URL

Since about an hour, I can't retrieve file content via the download URL attribute.
Each time I try to get it, API answers a 401 (unauthorized error).
Here's the code used: https://gist.github.com/arnaudbreton/5409015
Credentials are stored in GAE datastore and successfully retrieved / refresh.
The first call to file endpoint is working but not the second call to download content.
It was working this morning.
I tried different things so far:
- Revoke client secret (found as a solution in an other thread)
- Create a new client to test
- Disconnect my APP from Drive, accept it again
Nothing seems to solve my issue.
Thanks for your help.
A fix/rollback is in progress, should be back to normal soon.
You can use
resp.alternateLink;
resp.webContentLink;
i got stucked in the same issue a day back , using downloadUrl to get the content but got it with webContentLink.
var request = gapi.client.drive.files.list();
request.execute(function (resp) {
resp.alternateLink;
resp.webContentLink;
});

MySQL connection failing on same query. Trying to reconnect with default user

I am getting the following error on the same query:
Warning: mysql_query(): Access denied for user 'www-data'#'localhost' (using password: NO)
The error only occurs on the first try from any particular IP. After I refresh the page, the script runs fine. To be more specific, I will run it from a browser in one location, and it will error. If I refresh the page, the problem is fixed. That is until I try from another location.
From what I gather, its losing the connection to the database server and trying to reconnect with the default username. What's confusing me is that it fails on the same query each time. Let's call this query_X. Multiple queries run before query_X including selects, inserts, and updates. Query_X looks like this:
UPDATE game_users
SET status_cd=$tmp_status,
expire_date=date_add('$currentExpire', interval $l_license_duration_days day)
WHERE game_user_id=$l_game_user_id
As an example, the variables being passed are:
$tmp_status = 1;
$currentExpire = '2011-12-05';
$l_license_duration_days = 30;
$l_game_user_id = 1;
What is it about this query that makes the connection fail, and why does refreshing the page fix the problem?
Fyi, I'm using persistent connect.
Edit: I just tried again from an ip that I tried last night. And I received the error again. That is on the first run of the script. After I ran the page a second time, it worked fine.
Edit: It will also error the first time it's run on a particular browser, even if it is on the same IP, i.e. it will error once on firefox and then be fine, error on chrome once and then be fine, etc.
Edit: I've narrowed it down to a mail() function that was happening just before query_X. I still don't know why the mail function is closing the mySQL connection. I've decided to put the mail function (which works properly and sends the email) at the end of the php file, where I would close the connection anyways. It's a hack, but I've spent too much time on this already.
It looks like you closed the connection before some call to mysql_query(). The message of access denied should happen on the mysql_connect() phase.
Are you sure the error is in the query and not in the connect / close functions?