New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 502 Bad Gateway when I try to query table in SQL Server and server nginx #580
Comments
Thank you for filing this issue. It seems the request takes longer than 30 seconds, is that correct? |
Can you tell me how many tables and how many columns you have in your database? The method you see that are slow are analyzing the database structure. |
Yes, the problem is that database has about 3.000 tables, ¿it is possible that this is the problem? |
Yes it is.. I'm analyzing all the tables and I'm storing the structure in the cache for quick retrieval. |
It's possible modify anything in the API for just analyze the structure of tables that we are going to work, because for this project only needs 10 tables of this database. But the database complete is about 3.000 tables. |
Currently this is not configurable, but I can make it so that you can. |
I would appreciate it very much, because I only need to work with 10 tables for this project and I want to use this API, because this API is wonderful and very easy to use |
I've released a new version (v2.6.0). You can specify the "tables" now in the configuration. Let me know whether or not it works for you. |
The new parameter 'tables' in the configuration, Is a array of tables?? |
Yes, a string representing an array. As the README states it is a "Comma separated list of tables", see: https://github.com/mevdschee/php-crud-api/blob/master/README.md Does that work for you? |
Please enable "debug" in the configuration, that may give you some extra information (in the headers). |
What request do you do? Are you comparing with a text ntext or image? I can't do what sql server can't do ;-) |
You could try to use "field,sw,value" instead of "field,eq,value" when you are comparing. |
Is the primary key a text, ntext or image? |
Comment out 10585 (Content-Length) and uncomment line 5525. You should see the failing query. This should help you find the cause. |
Did you find the failing SQL query? |
I think that for this project I will design a simpler API, because there are very few tables and actions that must be performed on this SQL Server database. Thank you very much for your help. |
You are welcome. Good luck with the project and thank you for your feedback! |
Hi,
When I try to query table in SQL Server with the API, always I'm getting error 502 Bad Gateway. The server is ok, because a sample file with PDO connection PHP is working correctly, but the API is not working.
For analyze the problem, I have doing profiling and I'm looking that the server is very slow in the method that get the structure information table and finally return 502 Bad Gateway. I attach capture of profiling.
The text was updated successfully, but these errors were encountered: