#71 ✓invalid
Alex Farrill

Caching between thin server and db?

Reported by Alex Farrill | June 11th, 2008 @ 05:27 PM | in Future

Hi, I've switched to Thin (from Mongrel) in two of the applications I've launched. I've noticed sporadically in both apps that if I change something in my mysql database, some of the Thin procs will continue to run with the old data (from before the change), and some will query the database as they should. Unfortunately, I don't really have any way of verifying that Thin is doing it, but it's a hunch since it happens on some of the instances and not others (and is fixed when the Thins are restarted). Is such a thing even possible? Thanks for any help, sorry I can't provide you with anything more concrete.

Alex Farrill

Comments and changes to this ticket

  • macournoyer

    macournoyer June 11th, 2008 @ 05:31 PM

    Well you can check that all thins have been restarted at the same time if the pids are close to one another.

    Also make sure you check the log file for any error preventing one of the thin to restart.

  • Alex Farrill

    Alex Farrill June 11th, 2008 @ 09:20 PM

    The problem is I should not have to restart the thin servers when I make a

    change to the database. Is there caching going on at a low level?Thanks,

    Alex

  • macournoyer

    macournoyer June 11th, 2008 @ 10:02 PM

    • State changed from “new” to “invalid”

    oh no! Thin doesn't do any kind of caching.

    But, ActiveRecord caches some queries so that might cause your issue.

    You can reset the cache w/:

    ActiveRecord::Base.connection.clear_query_cache
    

    Maybe place that in a hidden action if you need to do that kind of thing.

  • Alex Farrill

    Alex Farrill June 12th, 2008 @ 01:33 PM

    Phew, sanity check. Yes, the problem had nothing to do with Thin, or ActiveRecord it turns out -- was grasping at straws! Thanks for your help, enjoying using Thin quite a bit

    Thanks again,

    Alex

  • John

    John April 23rd, 2024 @ 11:48 AM

    Oamenii încearcă să se asigure că.cazinoul poate fi o organizație profitabilă pe viață. Oamenilor din întreaga lume le place să joace la cazinourile online.Am jucat la cazinou GG Bet furnizorul de cazinou online cazinou GG Bet pentru o lungă perioadă de timp și nu pot spune nimic rău despre el, a spus el, Conform statisticilor, acest cazinou online are cel https://gg-bet-ro.com/ mai mare RTP

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages