Caching issue?

18 views
Skip to first unread message

Eric Barendt

unread,
Jun 26, 2012, 12:16:38 PM6/26/12
to rails-t...@googlegroups.com
Hi all,

We've been having a problem with Trinidad and what seems like a caching problem, or maybe a race condition (but I could be wrong). 

Occasionally when we load a page, I get an error. If I reload, it goes away, reload again and it comes back - maybe even a different error. They could be method not found errors, data not found in the db errors, etc. Requests for JavaScript assets return old versions of the files, then refreshing once or twice returns the right file, refreshing again and we get the old one. It's all very strange.

Any ideas on where to start?

Thanks,
Eric

kares

unread,
Jun 27, 2012, 2:03:42 AM6/27/12
to rails-t...@googlegroups.com

 Hi Eric, this is definitely very strange ...

Does this happen with a clean start as well or only after a re-deploy (since you mention old versions of JS files) touch tmp/restart.txt ?

K.

Eric Barendt

unread,
Jun 27, 2012, 11:22:25 AM6/27/12
to rails-t...@googlegroups.com
I'm not sure what was happening with the JS files - another team member had some problems, but I guess they're unrelated.

It happens with a clean start too, yes. If I set config.cache_classes to true, things work fine (but obviously no reloading). With that set to false, it seems like the classes are not loaded completely.

Eric


--
Has recibido este mensaje porque estás suscrito al grupo "Rails Trinidad" de Grupos de Google.
Para ver este debate en la Web, visita https://groups.google.com/d/msg/rails-trinidad/-/5T_8cN8kaisJ.

Para publicar una entrada en este grupo, envía un correo electrónico a rails-t...@googlegroups.com.
Para anular tu suscripción a este grupo, envía un correo electrónico a rails-trinida...@googlegroups.com
Para tener acceso a más opciones, visita el grupo en http://groups.google.com/group/rails-trinidad?hl=es.

kares

unread,
Jun 28, 2012, 2:02:31 AM6/28/12
to rails-t...@googlegroups.com

 OK, sounds like it might not be a Trinidad issue in the end ...

Try running with WebRick if it happens. If not than it would be great to isolate this on a minimal Rails app so we can take a look.
Than it would be valuable to know how you're running Trinidad `rackup` (and similars e.g. `rails s trinidad`) or plain-old `[bundle exec] trinidad`.

Thanks, K.



On Wednesday, June 27, 2012 5:22:25 PM UTC+2, Eric Barendt wrote:
I'm not sure what was happening with the JS files - another team member had some problems, but I guess they're unrelated.

It happens with a clean start too, yes. If I set config.cache_classes to true, things work fine (but obviously no reloading). With that set to false, it seems like the classes are not loaded completely.

Eric
On Tue, Jun 26, 2012 at 11:03 PM, kares <karol...@gmail.com> wrote:

 Hi Eric, this is definitely very strange ...

Does this happen with a clean start as well or only after a re-deploy (since you mention old versions of JS files) touch tmp/restart.txt ?

K.



On Tuesday, June 26, 2012 6:16:38 PM UTC+2, Eric Barendt wrote:
Hi all,

We've been having a problem with Trinidad and what seems like a caching problem, or maybe a race condition (but I could be wrong). 

Occasionally when we load a page, I get an error. If I reload, it goes away, reload again and it comes back - maybe even a different error. They could be method not found errors, data not found in the db errors, etc. Requests for JavaScript assets return old versions of the files, then refreshing once or twice returns the right file, refreshing again and we get the old one. It's all very strange.

Any ideas on where to start?

Thanks,
Eric

--
Has recibido este mensaje porque estás suscrito al grupo "Rails Trinidad" de Grupos de Google.
Para ver este debate en la Web, visita https://groups.google.com/d/msg/rails-trinidad/-/5T_8cN8kaisJ.

Para publicar una entrada en este grupo, envía un correo electrónico a rails-trinidad@googlegroups.com.
Para anular tu suscripción a este grupo, envía un correo electrónico a rails-trinidad+unsubscribe@googlegroups.com

Eric Barendt

unread,
Jul 17, 2012, 11:49:08 PM7/17/12
to rails-t...@googlegroups.com
We didn't have any problems running under Webrick. I think the problem may not be Trinidad after all, either. We're using MongoMapper and MongoDB. I believe the MongoMapper library, or at least parts of it, is not threadsafe, which poses problems when running under Trinidad or JRuby in general.

Thanks,
Eric
Reply all
Reply to author
Forward
0 new messages