SQL-Ledger Homepage

SQL-Ledger User Forum

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Cash -> Receipt hanging (General)

posted by Tariq(R), 16.02.2016, 05:49

Hi I have a problem with the Cash -> Receipt option. When I click it this results in the browser waiting for a server response which never comes and I then have to kill a process called cp.pl on the server in order to get the it working again! Even if I allow the process to wait for 5 mins I still get no response and eventually a timeout from the web server giving up.

If I turn on verbose logging on psql I can see this is the statement which does not complete (hangs). If I run this manually it also just hangs.

SELECT vc.*,
ad.address1, ad.address2, ad.city, ad.state, ad.zipcode,
ad.country, a.amount, a.paid,
a.exchangerate,
l.description AS translation
FROM customer vc
JOIN ar a ON (a.customer_id = vc.id)
JOIN acc_trans ac ON (a.id = ac.trans_id)
JOIN chart c ON (c.id = ac.chart_id)
JOIN address ad ON (ad.trans_id = vc.id)
LEFT JOIN translation l ON (l.trans_id = c.id AND l.language_code = '')
WHERE a.amount != a.paid
AND a.approved = '1'
AND a.onhold = '0'
AND NOT a.id IN (SELECT id
FROM semaphore)
ORDER BY vc.name;

I have numerous SQl-Ledger installs and this is the only one which does not complete however this install is also the largest database. I also notice the cash receipt option is slow on other installs but not yet failing to return. I wonder why it takes so long given that the cash receipt screen hardly contains anything other than a dropdown of customers?

I have tried a psql vacuum but it makes no difference. Please can someone help tell me how I can get this statement to return or to get my cash receipt option to work?

I'm using version 3.2 however the problem has been in previous versions too.

 

Complete thread:

Back to the forum
Board view  Mix view
986 Postings in 325 Threads, 327 registered users, 87 users online (0 registered, 87 guests)
SQL-Ledger User Forum | Admin contact
RSS-Feed
powered by my little forum