# |
Dec 13th 2017, 20:07 |
furqan |
also an insert using raw sql on the same table in the same code snippet takes milliseconds where the insert on that table through orm takes 20 seconds |
# |
Dec 13th 2017, 20:07 |
hmic |
table (*index*) to big to fit in the allocated ram? |
# |
Dec 13th 2017, 20:07 |
hmic |
so, how comes your insert needs a second now? |
# |
Dec 13th 2017, 20:06 |
hmic |
just put the app in a docker box and let them run this - problem solved. can stay on centos till they die :P |
# |
Dec 13th 2017, 20:06 |
furqan |
yes an insert to an empty table is very fast |
# |
Dec 13th 2017, 20:05 |
furqan |
I so so agree with you ,but unfortunately ,i am working in a very tightly coupled envoirnment ,where there are lots of approvals a person has to undergo for a minimal change ,apperantly their support team provides support only for centos (patching etc etc) as of which i had to start developement on centos only :( |
# |
Dec 13th 2017, 20:05 |
hmic |
try to get there first, before checking/considering anything else |
# |
Dec 13th 2017, 20:05 |
hmic |
an insert in an empty table on a local dbserver should be next to instant |
# |
Dec 13th 2017, 20:04 |
hmic |
lets just stay with your query execution times |
# |
Dec 13th 2017, 20:04 |
hmic |
go for a LTS ubuntu version the best, which is 16.04 as of now. |
# |
Dec 13th 2017, 20:03 |
hmic |
centos alone is an absolute no-no to me. it's so dated, you should not even consider using it! |
# |
Dec 13th 2017, 20:03 |
hmic |
i'm not very interested in the details. compare to the working one |
# |
Dec 13th 2017, 20:02 |
furqan |
Okay let me give a little background about the envoirnment ,its a corporate network behind a proxy ,but right now i am running everything on the local box and i do set the no_proxy option =localhost,127.0.0.1 ,the os is centos.. |
# |
Dec 13th 2017, 20:00 |
hmic |
a query execution time of a second for an insert is very suspicious to me already... |
# |
Dec 13th 2017, 20:00 |
hmic |
this is what i already expected: it's a problem in your environment, not cake |
# |
Dec 13th 2017, 19:59 |
furqan |
I am sorry ,i have very little experiance with cake and php ,strangely enough the same version of code works fine on a different box with every setting being the same.. |
# |
Dec 13th 2017, 19:58 |
hmic |
it changes *a lot* in the mysql lib behavior if you do! |
# |
Dec 13th 2017, 19:58 |
hmic |
btw. still try 127.0.0.1 instead of localhost |
# |
Dec 13th 2017, 19:55 |
hmic |
rather not. as the caches are doing exactly that... :P |
# |
Dec 13th 2017, 19:54 |
furqan |
Thanks hmic ,but the db server is on the same box ,localhost...i will enable debug to see further ,but is there a chance it has to do something with model caches |
# |
Dec 13th 2017, 19:54 |
hmic |
even one second for one statement seems *very* long to me, maybe something else in your setup is wrong anyways and cake just amplifies the error |
# |
Dec 13th 2017, 19:53 |
hmic |
enable debug and check the sqllog - in debugkit - to see the actual query times |
# |
Dec 13th 2017, 19:52 |
hmic |
furqan, does resolving the hostname of the db server maybe take "time"? |
# |
Dec 13th 2017, 19:51 |
furqan |
I have almost exhausted all resources and options to look for whats going wrong ,havent been able to establish anything ,which landed me here |
# |
Dec 13th 2017, 19:51 |
furqan |
Actually i am using an opensource project misp ,which is built using cakephp ,now the issue is that ,in a specific piece of code ,when i am using ORM to update teh table its taking 20 seconds per 1 write,and the same using raw sql queries takes less then a second |
# |
Dec 13th 2017, 19:49 |
hmic |
!tell furqan about ask |
# |
Dec 13th 2017, 19:49 |
furqan |
Hi guys,i am stuck with an issue with cakephp ,can anyone help me here !! |
# |
Dec 13th 2017, 19:31 |
feLiruc |
hey guys, good evening... can anybody here help me with IIS? :( |
# |
Dec 13th 2017, 18:48 |
bravo-kernel |
Gl with your api, easy huh |
# |
Dec 13th 2017, 18:48 |
bravo-kernel |
My bad :,) |
# |
Dec 13th 2017, 18:48 |
leon |
I only referred to the table, sorry :( |
# |
Dec 13th 2017, 18:47 |
bravo-kernel |
Good that it’s solved, I will see if I can make a note somewhere |
# |
Dec 13th 2017, 18:47 |
bravo-kernel |
But nvm |
# |
Dec 13th 2017, 18:47 |
bravo-kernel |
I asked for that, first thing ;) |
# |
Dec 13th 2017, 18:47 |
leon |
69/5000 Thanks to your help, I took a closer look at this part. |
# |
Dec 13th 2017, 18:46 |
leon |
I did not create an entity file for the articles. |
# |
Dec 13th 2017, 18:45 |
bravo-kernel |
@leon what was the cause? |
# |
Dec 13th 2017, 18:45 |
bravo-kernel |
woot? |
# |
Dec 13th 2017, 18:45 |
leon |
@bravo-kernel it works now!! yipiie! |
# |
Dec 13th 2017, 18:45 |
bravo-kernel |
@leon I have made https://github.com/alt3/cakephp-ember-api public |
# |
Dec 13th 2017, 18:44 |
mlignjatovic |
I have a strange problem, when I call $this->Flash->something, Phpstorm wont stop indexing. When I comment it, everything is ok. |