On 19 November 2013 19:55, Paulo Henrique Leite de Castro wrote:

I have this RoR (2.3.16) app that has a simple agenda tool. Each customer
has their own individual database, and I have one central database with
login, passwd and the customer database name.
Something like this:

- main_database:
- users_table:
- login_field
- passwd_field
- database_name_field

- customer_db_1:
- tables ....

- customer_db_2:
- tables ...

So, after user authentication, I set the correspondent database connection
according each customer.

The problem is:

Customer 1 sometimes see records from customer 2, even being on different

I'm totally lost here... I just suspect that this could be a database
connection cache issue, since the SQL query is the same for every customer
(ie.: select * from agendas;) but the connection string is different for
each one.

Most of the time everything runs ok.. but some customers are getting this
strange behaviour.

Any idea of what could be happening?
Put some debug code in to log stuff in order that you can work out
what it going wrong.


You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLu4Z3QrK_HJdxzQc%2BUVktkmLGjwZwmf3V%3DKQ5z9r8zeGg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 11 | next ›
Discussion Overview
grouprubyonrails-talk @
postedNov 20, '13 at 7:11a
activeNov 21, '13 at 9:34a



site design / logo © 2021 Grokbase