From: <da...@ha...> - 2014-07-03 20:59:10
|
On 2014-07-03 19:29, Alex wrote: > > I believe the error 113 means "no route to host" and that should fail > > Yes, the server was unreachable because it was down. > Yes, sorry, my point was perhaps unclear. I was just trying to say, that out of the many errors you could have gotten, you got 113. And that 113 should fail fast and not hang. But in the meantime, id's like to revise that statement. I have actaully gotten a 113 that hangs now. I finally succeeded in getting it to do so, by entering db_host as 192.188.1.3, which for me apparently cannot be routed. And now im seeing delays which may support to my original "timeout" theory. So i need you to test something. change your: db_host = mail02.example.com to: db_host = mail02.example.com;mysql_connect_timeout=1 (same line, no extra spaces) and the restart sqlgrey and see if it helps. Also. What version of sqlgrey are you running? > > I'd go with Lionel's suggestion to try and run sqlgrey without > > db_clustering to simplify the setup. Though i dont think itll show any > > difference, it should be an easy test and it will rule out (or confirm) > > that it has something to do with db_clustering. > > I don't really see how that's an option, though, because a client > could conceivably have to try three different servers before being > allowed to connect, meaning up to a fifteen minute delay before the > mail is even accepted, assuming the client even retries that many > times, which I doubt it would. That's the whole reason for clustering > in the first place. Well.. No. The reason you mention, is the reason for using a central sql-server. The reason for db-clustering, is the performance of the central sql-server. All your mail-nodes use the same write-host. And so the write host will have the same data as your readhosts. Theres no technical reason why all your mailservers couldnt use one central database, like so: [mail1] ---> [db] <---- [mail*] The reason i created dbclustering, was because i had some 10 mailservers at the time, with one central database and bot-nets were hammering sqlgrey, causing the db to hang sometimes, due to the sheer amount of lookups. So i setup a mysql-slave on each mailserver, had them replicate data from the master and made sqlgrey read from localhost only. This removed all the "read" load from the db-master. Under normal load, i can easily point all queries to the db-master, without any problems. I just tested with db_cluster=off and i can see select queries going to the master now, instead of localhost. And everything else works fine. > > > Then I'd try the same with the "spawn" setup you described below. > Does it > > make any difference if you comment out that line, and simply run it > using > > $ /usr/sbin/sqlgrey -d > > That is how I'm running it. Ah yes. I misread your reply to Lionel. Sorry. > The configuration isn't all that complex. Have you tested your > environment and know that yours works properly? Yes. I take a node out of my production environment temporarily for testing on and everthing i test acts as expected. > Could you post your config so I can compare with mine? loglevel = 2 reconnect_delay = 5 max_connect_age = 3 connect_src_throttle = 15 awl_age = 32 group_domain_level = 10 db_type = mysql db_name = sqlgrey db_host = dbmaster.example.com db_user = sqlgreyuser db_pass = password db_cleandelay = 60 db_cluster = on read_hosts=localhost prepend = 0 optmethod = optout discrimination = on discrimination_add_rulenr = on reject_first_attempt = immed reject_early_reconnect = immed reject_code = 451 > How did you set up mysql? 1 master and many slaves replicating. Each slave lives on the mailserver-node, together with postfix and sqlgrey. All sqlgrey's use localhost for read, master for write. > > > > > > > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > > > _______________________________________________ > Sqlgrey-users mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlgrey-users |