Bitcoin Forum
December 08, 2016, 02:17:38 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Poll
Question: Would you use such a mining proxy?  (Voting closed: April 13, 2011, 10:26:05 PM)
Yes, it seems like a good idea. - 7 (63.6%)
Maybe. - 1 (9.1%)
No, I don't like the idea. - 3 (27.3%)
No, I use something similar already. - 0 (0%)
Total Voters: 11

Pages: « 1 2 3 4 5 6 7 8 [9] 10 11 12 13 14 15 16 17 »  All
  Print  
Author Topic: Flexible mining proxy  (Read 83925 times)
cdhowie
Full Member
***
Offline Offline

Activity: 182



View Profile WWW
June 13, 2011, 04:58:20 AM
 #161

Anyone else care to check the contents of their /var/lib/php5? after running this for a while I started getting no disk space errors, upon further investigation I found out that PHP had created 15.5 million session files in /var/lib/php5. Fun.

Should anyone else bump into this problem, you'll probably notice that nothing can delete the files (rm, ls, find etc all hang) after much fiddling, the solution is to use ls -U1, which will print the file list unsorted, and then pipe the output to rm, like so. ls -U1 /var/lib/php5 | xargs rm -f

Gonna take me 5 days of rm to clean up all the session files, fun fun Cheesy

Besides this bug (which may just be some issue on my end) it seems great, I love how I can have pool redundancy in case one goes down.
Thanks for the report.  This was indeed a bug, and has been fixed in master.

Tips are always welcome and can be sent to 1CZ8QgBWZSV3nLLqRk2BD3B4qDbpWAEDCZ

Thanks to ye, we have the final piece.

PGP key fingerprint: 2B7A B280 8B12 21CC 260A  DF65 6FCE 505A CF83 38F5

SerajewelKS @ #bitcoin-otc
1481163458
Hero Member
*
Offline Offline

Posts: 1481163458

View Profile Personal Message (Offline)

Ignore
1481163458
Reply with quote  #2

1481163458
Report to moderator
1481163458
Hero Member
*
Offline Offline

Posts: 1481163458

View Profile Personal Message (Offline)

Ignore
1481163458
Reply with quote  #2

1481163458
Report to moderator
1481163458
Hero Member
*
Offline Offline

Posts: 1481163458

View Profile Personal Message (Offline)

Ignore
1481163458
Reply with quote  #2

1481163458
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481163458
Hero Member
*
Offline Offline

Posts: 1481163458

View Profile Personal Message (Offline)

Ignore
1481163458
Reply with quote  #2

1481163458
Report to moderator
kjj
Legendary
*
Offline Offline

Activity: 1302



View Profile
June 13, 2011, 05:07:42 AM
 #162

If you aren't using /var/lib/php5 for your session files, do "php -i | grep session.save_path" on the command line, or make a file with:

Code:
<?php
phpinfo
();
?>


In your document tree, and load it in your browser, then look for session.save_path.

An alternative removal method is:

Code:
find /tmp/ -name sess_\* -exec rm {} \;

p2pcoin: a USB/CD/PXE p2pool miner - 1N8ZXx2cuMzqBYSK72X4DAy1UdDbZQNPLf - todo
I routinely ignore posters with paid advertising in their sigs.  You should too.
cdhowie
Full Member
***
Offline Offline

Activity: 182



View Profile WWW
June 13, 2011, 05:09:00 AM
 #163

very strange..  it works fine if there is only one pool, but when I add multiples, it simply doesn't work.  I have also noticed that my stale/rejected shares went up extremely high...  In deepbit, for the last month I have been under 1% stales.  Using the proxy, I'm at almost 20% rejected shares Sad

I was really hoping that this would work
That's weird.  Sad  The code path isn't any different if you have one or more pools configured...

If any of you are still having stale share issues, would you mind taking a capture of the network traffic?  On the proxy host, issue this as root:

Code:
tcpdump -w proxy.pcap -s 65535 'port 80 or portrange 8332-8337'

Then email me the proxy.pcap file after an hour or two.  Note that this file will contain all of the traffic on these ports and this means that I will have access to your proxy worker passwords as well as your pool worker passwords.  You may certainly encrypt the file to my GPG key if you are worried about the file being intercepted.  (Specifically, note that if you talk to a bitcoind from the web server, this will expose your RPC password!  So be especially careful in this case.  I'm not going to misuse this information, but... well, if I were you, I wouldn't trust me blindly either. Wink)

If possible, capture traffic from the workers to the pools directly, without the proxy, and email me that as a separate file.  Comparing the two files will help me determine what's going on.

Even better, if you're using a pool supporting long-polling, have one miner going through the proxy and at the same time another one not using the proxy, and mail me both files.  Seeing how the long-polling requests return in both cases (they should be identical...) will help me diagnose this.

Thanks all for the feedback, donations, and support!  It's heartening to know that the software is fulfilling its purpose and that people find it helpful.  Smiley

Tips are always welcome and can be sent to 1CZ8QgBWZSV3nLLqRk2BD3B4qDbpWAEDCZ

Thanks to ye, we have the final piece.

PGP key fingerprint: 2B7A B280 8B12 21CC 260A  DF65 6FCE 505A CF83 38F5

SerajewelKS @ #bitcoin-otc
tito13kfm
Jr. Member
*
Offline Offline

Activity: 42



View Profile
June 13, 2011, 05:24:49 AM
 #164

Rebooted after crash and now Worker Status table on main dashboard is completely blank.  Recent work submissions and recent failed submissions still show up just fine in the top 2 tables, but the bottom table is blank.

Any ideas?

Edit:  I was also having connection issues.  I exported my workers and pools settings.  Imported the original schema back, and imported those saved settings.  All is well now.

cdhowie
Full Member
***
Offline Offline

Activity: 182



View Profile WWW
June 13, 2011, 02:08:53 PM
 #165

Rebooted after crash and now Worker Status table on main dashboard is completely blank.  Recent work submissions and recent failed submissions still show up just fine in the top 2 tables, but the bottom table is blank.

Any ideas?

Edit:  I was also having connection issues.  I exported my workers and pools settings.  Imported the original schema back, and imported those saved settings.  All is well now.
Sounds like the MySQL database got corrupted.  Which is weird, since table logs are supposed to keep that from happening.  :/

Tips are always welcome and can be sent to 1CZ8QgBWZSV3nLLqRk2BD3B4qDbpWAEDCZ

Thanks to ye, we have the final piece.

PGP key fingerprint: 2B7A B280 8B12 21CC 260A  DF65 6FCE 505A CF83 38F5

SerajewelKS @ #bitcoin-otc
teknohog
Sr. Member
****
Offline Offline

Activity: 412


minor developer


View Profile WWW
June 13, 2011, 09:54:12 PM
 #166

Has anyone got this working with Lighttpd (under Gentoo)? I am trying to rule out wider system-level errors before digging deeper into this code. Basically, my clients (Phoenix) are connecting to the proxy, but they are not getting any work. My PHP setup should be OK as I use it for other web content, and the admin interface seems to work fine. I have set this up in a separate port so there are no subdirectory issues for clients.

Freakin
Full Member
***
Offline Offline

Activity: 140


View Profile
June 13, 2011, 09:59:27 PM
 #167

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/REDACTED/public_html/admin/index.php on line 28

Hmm, not sure why i'm getting this.  This is on the admin page.  It complains about line 125 on the root
cdhowie
Full Member
***
Offline Offline

Activity: 182



View Profile WWW
June 14, 2011, 02:05:30 PM
 #168

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/REDACTED/public_html/admin/index.php on line 28

Hmm, not sure why i'm getting this.  This is on the admin page.  It complains about line 125 on the root
Which version of PHP?  It's possible that your version does not support function access modifiers.

Tips are always welcome and can be sent to 1CZ8QgBWZSV3nLLqRk2BD3B4qDbpWAEDCZ

Thanks to ye, we have the final piece.

PGP key fingerprint: 2B7A B280 8B12 21CC 260A  DF65 6FCE 505A CF83 38F5

SerajewelKS @ #bitcoin-otc
Freakin
Full Member
***
Offline Offline

Activity: 140


View Profile
June 14, 2011, 04:23:10 PM
 #169

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/REDACTED/public_html/admin/index.php on line 28

Hmm, not sure why i'm getting this.  This is on the admin page.  It complains about line 125 on the root
Which version of PHP?  It's possible that your version does not support function access modifiers.

4.4.8

5.x required?
exahash
Sr. Member
****
Offline Offline

Activity: 276



View Profile
June 14, 2011, 05:20:41 PM
 #170

Do you want patches?  I'm testing putting 50 miners through this proxy and was running into stability issues.  I have mysql on a separate machine and am used to that being a bottleneck, so I looked into making it use persistent connections.  I am not familiar with the PDO extension, but found the instantiator in common.inc.php on line 31; I added array(PDO::ATTR_PERSISTENT => true) to the new call and this took care of my problems.

The whole line now looks like this:

return new PDO($BTC_PROXY['db_connection_string'], $BTC_PROXY['db_user'], $BTC_PROXY['db_password'], array(PDO::ATTR_PERSISTENT => true) );

I now have 32 connections from the proxy web server staying open (which is what I want).

Hopefully this helps someone.


btcLeger
Member
**
Offline Offline

Activity: 98


View Profile
June 14, 2011, 08:23:40 PM
 #171

4.4.8

5.x required?
5.3 at least.

I use TradeHill instant BTC trading: http://www.tradehill.com/?r=TH-R11320

donations: 12BdMNcn7VQitFGMhtRojvwXbrX3Jcs9U6
Freakin
Full Member
***
Offline Offline

Activity: 140


View Profile
June 14, 2011, 11:17:57 PM
 #172

Cool got it working on a Centos 5.6 VM w/ 5.3.6

had a bit of difficulty getting PDO installed but it went ok.

looking forward to getting this working!
Freakin
Full Member
***
Offline Offline

Activity: 140


View Profile
June 14, 2011, 11:45:26 PM
 #173

There should be a way to copy worker/pool configs

so instead of setting up 10x pools on 10x workers you can set it up once then copy it to the rest, then go in and change the logins as necessary.  Or a way to use a variable in the config so you build X workers with the suffix X changed on each one

krom
Newbie
*
Offline Offline

Activity: 12


View Profile
June 14, 2011, 11:46:42 PM
 #174

All working "quite" well with 1 miner and 1 pool.

Some things i've noticed:
  • I have a lot of "Listener for "Proxy": 15/06/2011 00:23:30, Unexpected error:" lines on GUIMiner's console, using poclbm and the proxy.
  • Long polls seem to get through sometimes, but not all the time - i get a lot more of these when connecting to the pool directly, but maybe this was random.
  • Fall back to other pools does not work for me, nor will the miner work on any other pool than the first one i created, even if i disable that pool overall or remove it from the worker's list.
  • A second worker i added is able to get work (only from the first pool i defined as well), but the returned shares never show up anywhere - not on the dashboard nor the pool's stats page. "Last accepted submission" is "Never" for that worker all the time as well.

I'll dig into the problem further, but have no time to do so yet.
Besides that: Good work and keep it up! When i'll have more than some fractions of BC, i'll donate to you. Smiley

Update:
Long poll seem to be okay.
Problem 3 was solved by adding 'http://' to the pool's url. Won't work without.
Freakin
Full Member
***
Offline Offline

Activity: 140


View Profile
June 15, 2011, 03:25:38 AM
 #175

Really wish there was a way to monitor anything on solo mining besides getwork w/ the proxy
kripz
Full Member
***
Offline Offline

Activity: 182



View Profile
June 17, 2011, 01:45:14 PM
 #176

Testing out now, looks fairly solid.

What sort of values can i set for 'average_interval'? and what effects will it have?

Also, please add rejected per hour and efficiency.

Edit: I get alot of miner idle using this...

 Merged mining, free SMS notifications, PayPal payout and much more.
http://btcstats.net/sig/JZCODg2
Freakin
Full Member
***
Offline Offline

Activity: 140


View Profile
June 17, 2011, 04:11:46 PM
 #177

I had problems with this once i connected 4 machines to it (6 total miners).

Tried it soloing and on bitparking and while I slept and found that I wasn't getting what I was supposed to.

turned off both namecoin options and was hitting slush and deepbit and getting about 2/3 of the shares I should have

connections to the proxy started timing out, so restarting apache fixed it, but i didn't trust it enough to keep going

This was on a VM w/ 1GB of ram

What kind of hardware are you guys running on?


pwnyboy
Full Member
***
Offline Offline

Activity: 125


View Profile
June 17, 2011, 06:34:21 PM
 #178

Really wish there was a way to monitor anything on solo mining besides getwork w/ the proxy

There is indeed, it's called pushpool.  But it's a real PITA to build.  Once you have it going, it'll log shares to a text file, which you can use to dig out the info you want/need.  You can also make it log shares to the database backend (SQLite, MySQL etc).
Freakin
Full Member
***
Offline Offline

Activity: 140


View Profile
June 17, 2011, 08:05:35 PM
 #179

Really wish there was a way to monitor anything on solo mining besides getwork w/ the proxy

There is indeed, it's called pushpool.  But it's a real PITA to build.  Once you have it going, it'll log shares to a text file, which you can use to dig out the info you want/need.  You can also make it log shares to the database backend (SQLite, MySQL etc).

yeah I think I'm going to set up a POC pool on a VM for personal use and play around.

After 3 days soloing namecoin with 2GH and not finding a single block I don't plan on doing that again anyways... Wouldn't be so bitter if I hadn't found 23 blocks in the week before (half at ~3k difficulty) for BitParking
carlo
Full Member
***
Offline Offline

Activity: 132


View Profile
June 17, 2011, 10:00:50 PM
 #180

Im testing your proxy now since a week. they main problem seems to be the apache.

i figured out that it does reject lesser shares if i run this settings for the apache:
KeepAlive=On
KeepAliveTimeout=60
MaxKeepAliveRequests=250
MaxClients=100

I run 8 GPU miners.

But its still not the same reject rate if i connect directly to a pool. Im happy if somebody has other ideas, cause the fail-over is so nice in days of ddos.

Problems during the last 2 days:
Code:
ERROR: Cannot connect to Bitcoin: Bitcoin returned error message: Work not found in proxy database.
ERROR: Cannot connect to Bitcoin: Bitcoin returned error message: <?xml version="1.0" encoding

cheers
Pages: « 1 2 3 4 5 6 7 8 [9] 10 11 12 13 14 15 16 17 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!