Search Results

Search found 841 results on 34 pages for 'balance'.

Page 7/34 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Unexpected behaviour when dynamically add node in HAproxy server

    - by Anand Soni
    I wanted to use HAProxy for my web app for load balancing purpose. I am trying to add a new rabbitmq node dynamically in HAProxy server using command : haproxy -p /var/run/haproxy.pid -sf $(cat /var/run/haproxy.pid). I am doing tcp connection mode with leastconn balance algorithm in load balancing. What is expected is when there is 3 connection in one rabbitmq, I add a new rabbit server in HAProxy server. so the next connection would pass to 2nd rabbitmq server which is not happening in my case. It distributes the connection in haphazardly manner. Here is my config file: defaults log global mode http option httplog option dontlognull retries 3 option redispatch maxconn 2000 contimeout 5000 clitimeout 5000 srvtimeout 5000 listen rabbitmq 0.0.0.0:5672 mode tcp stats enable balance leastconn option tcplog server rabbit01 xx.xx.xx.xx:5672 check server rabbit02 xx.xx.xx.xx:5672 check listen tomcatq 0.0.0.0:80 mode http stats enable balance roundrobin stats refresh 10s stats refresh 10s stats uri /lb?stats stats auth admin:admin option httplog What is the problem causing this behavior? Any suggestion will appreciated.

    Read the article

  • HaProxy - Http and SSL pass through config

    - by Bill
    I've currently got an HaProxy LB solution in place and everything is working fine however we are having an issue with a very few clients who cannot get to our site via HTTPS (SSL) they can browse our site in Http but as soon as they click on an absolute HTTPS link they are taken to our home page instead. Wondering if anyone can look at our config below and see if there's something awry. I believe we are on HaProxy 1.2.17 global log 127.0.0.1 local0 log 127.0.0.1 local1 notice #log loghost local0 info maxconn 6144 #debug #quiet user haproxy group haproxy defaults log global mode http option httplog option dontlognull retries 3 redispatch maxconn 2000 contimeout 5000 clitimeout 50000 srvtimeout 50000 stats auth # admin password stats uri /monitor listen webfarm # bind :80,:443 bind :443 mode tcp balance source #cookie SERVERID insert indirect #option httpclose #option forwardfor #option httpchk HEAD /check.cfm HTTP/1.0 server webA 111.10.10.1 #server webB 111.10.10.2 server webB 111.10.10.3 server webC 111.10.10.4 listen webfarmhttp :80 mode http balance source # option httpclose option forwardfor # option httpchk HEAD /check.cfm HTTP/1.0 option httpchk /check.cfm server webA 111.10.10.1 #server webB 111.10.10.2 server webB 111.10.10.3 server webC 111.10.10.4 listen monitor :8443 mode http balance roundrobin #cookie SERVERID insert indirect option httpclose option forwardfor #option httpchk HEAD /check.txt HTTP/1.0 #option httpchk HEAD /check.cfm HTTP/1.0 server webA 111.10.10.1 server webB 111.10.10.2

    Read the article

  • Mysql Groupby and Orderby problem

    - by luvboy
    Here is my data structure when i try this sql select rec_id, customer_id, dc_number, balance from payments where customer_id='IHS050018' group by dc_number order by rec_id desc; something is wrong somewhere, idk I need rec_id customer_id dc_number balance 2 IHS050018 DC3 -1 3 IHS050018 52 600 Thanx

    Read the article

  • ALTER TABLE error

    - by Travis
    Can someone explain to me why I am receiving the following error? I want to rename the column "exerciseID" to "ID" in a mysql table using the following syntax. ALTER TABLE `exercises` CHANGE `exerciseID` `ID` INT( 11 ) NOT NULL AUTO_INCREMENT However I receive the following error: MySQL said: #1025 - Error on rename of './balance/#sql-de_110e' to './balance/exercises' (errno: 150) Any suggestions would be much appreciated

    Read the article

  • PHP echo text if variable is blank

    - by user342391
    I am trying to echo €00.00 if my variable $amount equals zero I have done something wrong can you help?? Code while ($row9 = mysql_fetch_array($result9)) { $amount = $row9['amount']; } //$amount = $amount / 60; //$amount = round($amount, 2); if $amount == 0 echo "<b>Balance: &#8364;00.00</b>"; else echo "<b>Balance: $$amount</b>";

    Read the article

  • rails multiple outer joins syntax

    - by Craig McGuff
    I have the following models user has_many :leave_balances leave_balance belongs_to :user belongs_to :leave_type leave_type has_many :leave_balances I want to output a table format showing user names and their balance by leave type. Not every user can have every balance i.e. outer joins required. I'd like to see something like this: Employee Annual Leave Sick Leave Bob 10 Fred 9 Sara 12 15 I am unsure how to get this out as a single statement? I am thinking something like User.joins(:leave_balances).joins(:leave_type)

    Read the article

  • how to change constraints errors messange in grails

    - by nightingale2k1
    Hi, I have domain with constraints like min value must greater than 0 I have no idea how to change the message if the constraints are not passed. which file i need to edit to do that ? I also need to display the value as well .. like "you cannot make any transaction because your balance is less than 100. Your current balance is xxxx "

    Read the article

  • mysql with 3 group by and sum

    - by cyberfly
    Hi all I have this data in my table (tb_cash_transaction) I want to group the TYPE column, CURRENCY_ID column and AMOUNT column so it will become like below: **Currency** **Cash IN** **Cash OUT** **Balance** 14 40000 30000 10000 15 50000 40000 10000 Rule : 1.Group by currency 2.Then find the sum of cash in for that currency 3.Find the sum of cash out for that currency 4.Get the balance (sum cash in - sum cash out) How to achieve it using mysql? I try using group by but cannot get the desired output. Thanks in advance

    Read the article

  • Why won't this piece of my code write to file

    - by user2934783
    I am developing a c++ banking system. I am able to get the float, newbal, values correctly and when I try to write to file, there is no data in the file. else { file>>firstname>>lastname; cout<<endl<<firstname<<" "<<lastname<<endl; cout<<"-----------------------------------\n"; string line; while (getline(file, line)) { //stringstream the getline for line string in file istringstream iss(line); if (iss >> date >> amount) { cout<<date<<"\t\t$"<<showpoint<<fixed<<setprecision(2)<<amount<<endl; famount+=amount; } } cout<<"Your balance is $"<<famount<<endl; cout<<"How much would you like to deposit today: $"; cin>>amountinput; float newbal=0; newbal=(famount+=amountinput); cout<<"\nYour new balance is: $"<<newbal<<".\n"; file<<date<<"\t\t"<<newbal; //***This should be writing to file but it doesn't. file.close(); The text file looks like this: Tony Gaddis 05/24/12 100 05/30/12 300 07/01/12 -300 //Console Output looks like this Tony Gaddis 05/24/12 100 05/30/12 300 07/01/12 -300 Your balance is: #1 How much wuld you like to deposit: #2 Your new balance is: #1 + #2 write to file close file. //exits to main loop:::: How can I make it write to file and save it, and why is this happening. I tried doing it with ostringstream as well considering how I used istringstream for the input. But it didn't work either :\ float newbal=0; newbal=(famount+=amountinput); ostringstream oss(newbal); oss<<date<<"\t\t"<<newbal; I am trying to self teach c++ so any relevant information would be kindly appreciated.

    Read the article

  • How to achieve a specific fraction(say 80%) of the cpus and balanced over them

    - by swellfr
    Hi, I was wondering if it would be possible to run app not at 100% of the cpu but at a specific amount of the cpus. I see different usage of this , we can better balance concurrent application ( we may want to have balance app 50% to have fair apps/agent/... ) i was also wondering if the power consumption would not be better if the cpus doesnt run at full throttle but at some lower level( say 80% ) What are your thoughts Thx examples are welcomed :)

    Read the article

  • Ruby number_to_currency displays a totally wrong number!

    - by SueP
    Greetings! I’m an old Delphi programmer making the leap to the Mac, Ruby, Rails, and web programming in general. I’m signed up for the Advanced Rails workshop at the end of the month. In the meantime, I’ve been working on porting a mission-critical (of course) app from Delphi to RAILS. It feels like I’ve spent most of the past year with my head buried in a book or podcast. Right now, I’ve hit a major issue and I’m tearing my hair out. I literally don’t know where to go with this, I desperately don’t want to deploy with this bug, and I’m feeling a bit frantic. (The company database is currently running on an ancient XP box that’s looking rustier by the day.) So, I set up a test database that shows the problem. I’m running: OS/X 10.6.3 Rails 2.3.5 ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0] MySQL 5.1.38-log via socket MySQL Client Version 5.1.8 ActiveRecord::Schema.define(:version => 20100406222528) do create_table “money”, :force => true do |t| t.decimal “amount_due”, :precision => 10, :scale => 2, :default => 0.0 t.decimal “balance”, :precision => 10, :scale => 2, :default => 0.0 t.text “memofield” t.datetime “created_at” t.datetime “updated_at” end The index view is right out of the generator, slightly modified to add the formatting that's breaking on me. Listing money <table> <tr> <th>Amount</th> <th>Amount to_s </th> <th>Balance to $</th> <th>Balance with_precision </th> <th>Memofield</th> </tr> <% @money.each do |money| %> <tr> <td><%=h money.amount_due %></td> <td><%=h money.amount_due.to_s(‘F’) %></td> <td><%=h number_to_currency(money.balance) %></td> <td><%=h number_with_precision(money.balance, :precision => 2) %></td> <td><%=h money.memofield %></td> <td><%= link_to ‘Show’, money %></td> <td><%= link_to ‘Edit’, edit_money_path(money) %></td> <td><%= link_to ‘Destroy’, money, :confirm => ‘Are you sure?’, :method => :delete %></td> </tr> *<% end %> *</table> <%= link_to ‘New money’, new_money_path %> This seemed to work pretty well. Then I started testing with production data and hit a major problem with number_to_currency. The number in the database is: 10542.28, I verified it with the MySQL Query Browser. RAILS will display this as 10542.28 unless I call number_to_currency, then that number is displayed as: $15422.80 The error seems to happen with any number between 10,000.00 and 10,999.99 So far, I haven’t seen it outside of that range, but I obviously haven’t tested everything. I guess my workaround is to remove number_to_currency, but that leaves the views looking really sloppy and unprofessional. The formatting is messed up, things don’t line up properly and I can’t force the display to 2 decimal places. I’m seriously hoping there is an easy fix for this. I can’t imagine this being a widespread problem. It would affect so many people that someone would have fixed it! But I don’t know where to go from here. I’d desperately like some help. (Later – number_with_precision fails the same way number_to_currency does.) Sue Petersen

    Read the article

  • How to bulk insert data from ref cursor to a temporary table in PL/SQL

    - by Sambath
    Could anyone tell me how to bulk insert data from a ref cursor to a temporary table in PL/SQL? I have a procedure that one of its parameters stores a result set, this result set will be inserted to a temporary table in another stored procedure. This is my sample code. CREATE OR REPLACE PROCEDURE get_account_list ( type_id in account_type.account_type_id%type, acc_list out sys_refcursor ) is begin open acc_list for select account_id, account_name, balance from account where account_type_id = type_id; end get_account_list; CREATE OR REPLACE PROCEDURE proc1 ( ... ) is accounts sys_refcursor; begin get_account_list(1, accounts); --How to bulk insert data in accounts to a temporary table? end proc1; In SQL Server, I can write as code below CREATE PROCEDURE get_account_list type_id int as select account_id, account_name, balance from account where account_type_id = type_id; CREATE PROCEDURE proc1 ( ... ) as ... insert into #tmp_data(account_id, account_name, balance) exec get_account_list 1 How can I write similar to the code in SQL Server? Thanks.

    Read the article

  • Highstock Chrome/Firefox/Opera

    - by Matthias
    Is there any particular reason that this HighStock chart: var chart; $(function() { chart = new Highcharts.StockChart({ chart: { renderTo: 'container' }, title: { text: 'Total balance over time' }, xAxis: { type: 'datetime', maxZoom: 7 * 24 * 3600000, // one week title: { text: null } }, yAxis: { title: { text: 'Balance' }, startOnTick: false, showFirstLabel: false }, tooltip: { shared: true }, series: [{ type: 'area', name: 'Account balance', pointInterval: 14 * 3600 * 1000, pointStart: Date.UTC(2012, 3, 11), data: [ 0.7809, 0.7827, 0.7848, 0.785, 0.7873, 0.7894, 0.7907, 0.7909, 0.7947, 0.7987, 0.799, 0.7927, 0.79, 0.7878, 0.7878, 0.7907, 0.7922, 0.7937, 0.786, 0.787, 0.7838, 0.7838, 0.7837, 0.7836, 0.7806, 0.7825, 0.7798, 0.777, 0.777, 0.7772, 0.7793, 0.7788, 0.7785, 0.7832, 0.7865, 0.7865, 0.7853, 0.7847, 0.7809, 0.778, 0.7799, 0.78, 0.7801, 0.7765, 0.7785, 0.7811, 0.782, 0.7835, 0.7845, 0.7844, 0.782, 0.7811, 0.7795, 0.7794, 0.7806, 0.7794, 0.7794, 0.7778, 0.7793, 0.7808, 0.7824, 0.787, 0.7894, 0.7893, 0.7882, 0.7871, 0.7882, 0.7871, 0.7878, 0.79, 0.7901, 0.7898, 0.7879, 0.7886, 0.7858, 0.7814, 0.7825, 0.7826, 0.7826, 0.786, 0.7878, 0.7868, 0.7883, 0.7893, 0.7892, 0.7876, 0.785, 0.787, 0.7873, 0.7901, 0.7936, 0.7939, 0.7938, 0.7956, 0.7975, 0.7978, 0.7972, 0.7995, 0.7995 ] }] }); }); is rendered without any problems in Opera, but not working in Chrome or Firefox? I'm also using some HighChart pie charts. Those are rendered without any issues on all browsers. All of the demos on the HighStock Demo Gallery are working without problems.

    Read the article

  • Windows Server 2003 - Handling hundreds of simultaneous downloads

    - by Paul Hinett
    At the moment I have a single server with 4 1TB hard disks, daily I haver over 150 MP3 music files uploaded (around 80mb each). At busy periods there is over 300 people streaming / downloading these mixes all at once, 75% of the activity is on the most recently uploaded stuff which is all on a single hard disk. My read speads on the hard disk are very low due to such high activity of 200+ reads all happening at the same time on a single hard disk (ran some tests with HDTach). What would be a logical solution to solve this, a couple of ideas I had are: Load balance with another server Install faster hard disks (what are best these days? SCSI / SATA) Spread the most accessed files over the 4 drives so it is sharing the load between all 4 disks, instead of all the most accessed (most recent) all on the most recently installed drive. Obviouslly load balance is the most expensive option, but would it dramatically help? Some help on this situation would be great!

    Read the article

  • How to cluster two IIS servers for failover?

    - by Ram Gopal
    We have IIS servers running in 2 machines hosting few webservices which provided some integration services to an old document Mgmt system, word/excel related service, etc.... We need to cluster/load balance these 2 IIS in order to achieve a fail-over. i.e If one of the IIS server is down, the other on should be able to handle the request. The reverse proxy used in the DMZ is also IIS 7.5 Our overall business application is in fact a J2EE one and we have successfully deployed on a weblogic cluster installed on the same two machines and load balance from the same above mentioned IIS reverse proxy at DMZ. But we do not know how to achieve this in case of IIS.

    Read the article

  • Do i need a dedicated server for load balancing?

    - by Ben
    I'm completely new to the concept of load balancing so i hope this question isn't a "stupid question" because i've been searching around and im having a hard time understanding this. So to my understanding, in order to load balance, i need a separate machine with an ip address i can direct all traffic to. I initially thought i needed to rent 3 dedicated servers, one for load balancing and the other two as backend servers. Would a dedicated server be too much for a load balancer or do hosting companies have special types of computers for that process? Then i read somewhere else that i can install a load balance software in both of the two servers and configure it in a way that doesn't require me to rent another machine/dedicated server for load balancing. So im a bit confuse on how to actually implement a load balancer and whether or not i need a dedicated server for the sole purpose of acting as a load balancing machine. Also, i was recommended to use HAproxy so i'll be heading that direction for load balancing.

    Read the article

  • Windows Load-Balancing, Forward-Proxying Software

    - by LandonC
    Does anyone know of any Windows software that will do forward-proxying load-balancing, like HAProxy does? There are tons of reverse-proxy solutions, but I can't find any that do what HAProxy does, that is, allows you to load-balance a group of forwarding-proxies. I have a proxy farm (don't ask) that I need to round-robin balance. HAProxy will do it, but is very unstable on Windows. Thoughts? I'd really appreciate it. And yes, this is an actual, production environment question.

    Read the article

  • haproxy not passing X_FORWARD_FOR on HTTP POST

    - by Mark L
    Hello, I've setup HAProxy with the option forwardfor option so it'll pass on the user's IP to PHP via $_SERVER[ "HTTP_X_FORWARDED_FOR" ]. If the page request isn't a POST it's populated fine but if it is then it won't be populated. Any ideas where I've gone wrong? Thanks everyone! My whole HAProxy conf file for reference: global log 127.0.0.1 local0 log 127.0.0.1 local1 notice #log loghost local0 info maxconn 4096 #chroot /usr/share/haproxy user haproxy group haproxy daemon #debug #quiet defaults log global mode http option httplog option dontlognull retries 3 option redispatch maxconn 4096 contimeout 5000 clitimeout 50000 srvtimeout 50000 listen webfarm :80 mode http balance roundrobin option forwardfor server webA 192.168.240.4 weight 1 maxconn 2048 check server webB 192.168.240.3 weight 1 maxconn 2048 check listen smtp :25 mode tcp option tcplog balance roundrobin server smtp 192.168.240.4:25 check

    Read the article

  • HAProxy with 'backup' failure

    - by A.RG
    I have a simple configuration of 2 MySQL being load balanced by HAProxy. For an unfortunate reason I need to use them in Passive\Active mode. So I thought I'd configure one DB as 'backup' and go to sleep. But I was wrong. Whenever I add the 'backup' to the server line HAProxy throws a communication link error (essentially saying 'no DB available" (with the 'backup' it works great). It just doesnt consider that server as a valid option any more... I have tried this configuration: listen mysql 10.0.0.109:3307 mode tcp balance roundrobin option httpchk server db01 10.0.0.236:3306 server db02 10.0.0.68:3306 backup and also this configuration: frontend mysql_proxy bind 10.0.0.109:3307 default_backend mysql backend mysql mode tcp balance roundrobin option httpchk server db01 10.0.0.236:3306 server db02 10.0.0.68:3306 backup Nothing worked! Can anyone point me in the right direction? Thanks

    Read the article

  • Load balancing two web servers with ultra monkey

    - by Mark L
    Hello, In 2006 a company I was working with setup two load balancers to balance traffic between two web servers. We used ultra monkey to do so. I'm hoping to do the same now. My question: Would anyone recommend using ultra monkey to balance traffic between two linux boxes running apache? Are there other linux-based alternatives which have since proven to be better for this task? Would you still install debian sarge on a load balancer given it's age? Thanks everyone!

    Read the article

  • haproxy - pass original / remote ip in tcp mode

    - by Vito Botta
    I've got haproxy set up with keepalived for load balancing and ip failover of a percona cluster, and since it works great I'd like to use the same lb / failover for another service/daemon. I've configured haproxy this way: listen my_service 0.0.0.0:4567 mode tcp balance leastconn option tcpka contimeout 500000 clitimeout 500000 srvtimeout 500000 server host1 xxx.xxx.xxx.xx1:4567 check port 4567 inter 5000 rise 3 fall 3 server host2 xxx.xxx.xxx.xx2:4567 check port 4567 inter 5000 rise 3 fall 3 The load balancing works fine, but the service sees the IP of the load balancer instead of the actual IPs of the clients. In http mode it's quite easy to have haproxy pass along the remote IP, but how do I do in tcp mode? This is critical due to the nature of the service I need to load balance. Thanks! Vito

    Read the article

  • How to set the request start time with HAProxy?

    - by Tupy
    I would like to measure the time of full request stack. The New Relic capture time of the middleware (e.g. java, python, ruby) and request time (See https://newrelic.com/docs/features/tracking-front-end-time). For this, I need to configure the X-Request-Start header as the request pass through the HAProxy load balance. The haproxy.cfg should look like: backend www balance roundrobin mode http reqadd "X-Request-Start" UNKNOWN_TIME_FUNCTION() server servername 192.168.0.1:80 weight 1 check There is a haproxy native function to replace the UNKNOWN_TIME_FUNCTION()?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >