Yes, thanks Michele!
Omg, I was using web2py with apache. With the same code and using rocket
server no errors occurs and the databases was created.
I configured apache with web2py script. Someone knows whats happen?
Anyway, now I can configure database with rocket than manage with apache.
It's working now!
I think some index makes apache/mysql crazy and returned this error:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Traceback (most recent call last):
File "/var/www/sistema/gluon/main.py", line 550, in wsgibase
BaseAdapter.close_all_instances('rollback')
File "/var/www/sistema/gluon/dal.py", line 558, in close_all_instances
db._adapter.close(action)
File "/var/www/sistema/gluon/dal.py", line 538, in close
getattr(self, action)()
File "/var/www/sistema/gluon/dal.py", line 1789, in rollback
return self.connection.rollback()
ProgrammingError: (2014, "Commands out of sync; you can't run this command now")
Thanks Michele, if I have some news I'll post here. I'll try using commits
at each index creation.
Em 12/11/2013 07:33, "Michele Comitini" <[email protected]>
escreveu:
> The error you sent seems to point to some statement that has not been
> properly closed. The commit/rollback happens in the middle of an open
> statement? That is what mysql seems to say. The problem could be earlier
> than when the error raises.
>
> Hard to say where. You could try to force db.commit/rollback in different
> places to see where you start see errors.
>
>
>
> 2013/11/12 Diogo Munaro <[email protected]>
>
>> The error continues, but without index :(
>>
>> The indexes are successful created
>>
>>
>> 2013/11/11 Michele Comitini <[email protected]>
>>
>>> What happens if you remove the index creation inside the try/except
>>> block?
>>>
>>>
>>> 2013/11/11 Diogo Munaro <[email protected]>
>>>
>>>> It's not a simple function, but putting the model definition inside the
>>>> function.
>>>>
>>>> Here the code: http://pastebin.com/rN7gvAT8
>>>>
>>>> Attached the error ticket
>>>>
>>>>
>>>> Em segunda-feira, 11 de novembro de 2013 08h34min44s UTC-2, Michele
>>>> Comitini escreveu:
>>>>
>>>>> If you define a function like
>>>>> def f():
>>>>> pass
>>>>>
>>>>> in a model, you should have no problems.
>>>>> Just show us an extract of code that causes the problem, without
>>>>> violating any reserved information or IP.
>>>>> That way we can help you...
>>>>>
>>>>> mic
>>>>>
>>>>>
>>>>> Il giorno lunedì 11 novembre 2013 10:43:49 UTC+1, Diogo Munaro ha
>>>>> scritto:
>>>>>>
>>>>>> Hi guys, first the problem:
>>>>>>
>>>>>> I need some databases with identical structure, but with different
>>>>>> data. These databases must be stored with the clients because they want
>>>>>> (different locations), but the auth system is unique.
>>>>>>
>>>>>> So, my structure by now is: a centralized auth system and some
>>>>>> disyributed databases. The centralized system controls access to other
>>>>>> databases.
>>>>>>
>>>>>> Teoricaly web2py works great with it, because I defined a function
>>>>>> that I pass connection string, access control db and its made a lot of
>>>>>> databases replicas with foreign keys to access control database.
>>>>>>
>>>>>> Without the function it works great, but with, it make a complete
>>>>>> first client database and then crash all of web2py. It returns a ciclic
>>>>>> ticket error when I try access any application of that web2py, either
>>>>>> Welcome application.
>>>>>>
>>>>>> Im using web2py 2.7.4 with mysql on ubuntu. So, whats happening? I
>>>>>> cant define model with function. Oh, my function is in the same model
>>>>>> file.
>>>>>>
>>>>>> BR, Diogo
>>>>>>
>>>>> --
>>>> Resources:
>>>> - http://web2py.com
>>>> - http://web2py.com/book (Documentation)
>>>> - http://github.com/web2py/web2py (Source code)
>>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "web2py-users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>>
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>> --
>>> Resources:
>>> - http://web2py.com
>>> - http://web2py.com/book (Documentation)
>>> - http://github.com/web2py/web2py (Source code)
>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "web2py-users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/web2py/_OnWZGMqkE0/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>> --
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/_OnWZGMqkE0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.