Limitation of open files ...
Limitation of open files ...
Hi !
Exist something like limitation how many can open dbfs+cdxs in xHarbour ? In one old application I added 3 dbfs + 3 cdxs . Until that number of opens files was 98 , now 104 . I don't know really with what that is related - xharbour , Win 2003 server , clients PC . But in network in some PC browses , that related with that new tables , are empty . In 2 PC all is working OK , in server all is working OK . Where it can be problem ?
With best regards !
Exist something like limitation how many can open dbfs+cdxs in xHarbour ? In one old application I added 3 dbfs + 3 cdxs . Until that number of opens files was 98 , now 104 . I don't know really with what that is related - xharbour , Win 2003 server , clients PC . But in network in some PC browses , that related with that new tables , are empty . In 2 PC all is working OK , in server all is working OK . Where it can be problem ?
With best regards !
Rimantas U.
- gkuhnert
- Posts: 274
- Joined: Fri Apr 04, 2008 1:25 pm
- Location: Aachen - Germany // Kerkrade - Netherlands
- Contact:
Re: Limitation of open files ...
Rimantas,
I don't know anything about limitation of files, but you could try these options to isolate the cause of error:
- Open the dbs without applying an order to find out, if an index is corrupted or not usable
- Open the program locally on the computer(s) that are causing the problems to see if it's related to network or to the workstation
- Look if the problem is related to one operating system (for Example only Vista computers show the problem)
- after opening count the number of records (cAlias)->(FCount()) or similar (and write it to a log)
- after applying an order count the records
Maybe this can be of help
I don't know anything about limitation of files, but you could try these options to isolate the cause of error:
- Open the dbs without applying an order to find out, if an index is corrupted or not usable
- Open the program locally on the computer(s) that are causing the problems to see if it's related to network or to the workstation
- Look if the problem is related to one operating system (for Example only Vista computers show the problem)
- after opening count the number of records (cAlias)->(FCount()) or similar (and write it to a log)
- after applying an order count the records
Maybe this can be of help
Re: Limitation of open files ...
I will try this your advices . Small enterprise - 10-15 pc working in network . Win2003 server , and all PC XP , about sp of xp on the clients PCs I don't know . How can be related corrup.index , if in 2 PC browses are working OK and in the server too all is working OK ? I'll test also how it varry with number of opened files . Very strange , such problem I'm seeing first time ...gkuhnert wrote: - after opening count the number of records (cAlias)->(FCount()) or similar (and write it to a log)
- after applying an order count the records
Regards !
Rimantas U.
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Limitation of open files ...
As suggested already, I would do the initial test on a stand-alone PC. I would also just loop and open the same DBF in different workareas. This will eliminate a lot of issues.
Are you getting an error, and if so, what is it?
Regards,
James
Are you getting an error, and if so, what is it?
Regards,
James
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Limitation of open files ...
Rimantas,
I just found this old test in my notes. I just reran it and it opens 9999 files without problem (local PC running XP).
I probably never have more than 20-30 files open at any one time so it has not been an issue for me. I open and close files as needed.
James
I just found this old test in my notes. I just reran it and it opens 9999 files without problem (local PC running XP).
I probably never have more than 20-30 files open at any one time so it has not been an issue for me. I open and close files as needed.
James
Code: Select all
#include "fivewin.ch"
function main()
local i
for i= 1 to 9999
use cust new
next
? "done"
return nil
- Robert Frank
- Posts: 95
- Joined: Fri Nov 23, 2007 4:43 am
- Location: Gdynia-Poland
- Contact:
Re: Limitation of open files ...
RimantasRimantas wrote:Hi !
Exist something like limitation how many can open dbfs+cdxs in xHarbour ? In one old application I added 3 dbfs + 3 cdxs . Until that number of opens files was 98 , now 104 . I don't know really with what that is related - xharbour , Win 2003 server , clients PC . But in network in some PC browses , that related with that new tables , are empty . In 2 PC all is working OK , in server all is working OK . Where it can be problem ?
With best regards !
Have you got somethink like this in your application source code?
Function xHBRddInit()
REQUEST DBFCDX
REQUEST DBFFPT
dbSetDriver("DBFCDX")
// REQUEST HB_CODEPAGE_PLWIN
// REQUEST HB_LANG_PLWIN
// hb_SetCodepage( "PLWIN" )
// hb_langselect('PLWIN')
REQUEST HB_CODEPAGE_PL852
REQUEST HB_LANG_PL852
hb_SetCodepage( "PL852" )
hb_langselect('PL852')
SET DBFLOCKSCHEME TO 3
RETURN NIL
I had some problems like yours up to time when I wrote this line
SET DBFLOCKSCHEME TO 3
Robert Frank
Re: Limitation of open files ...
Function xHBRddInit()
REQUEST DBFCDX
REQUEST DBFFPT
dbSetDriver("DBFCDX")
SET DBFLOCKSCHEME TO 3
RETURN NIL
I had some problems like yours up to time when I wrote this line
SET DBFLOCKSCHEME TO 3[/quote]
Wow ! Interesting ! Here is mine :
I'll try with "SET DBFLOCKSCHEME TO 3" . Many thanks !
Regards !
REQUEST DBFCDX
REQUEST DBFFPT
dbSetDriver("DBFCDX")
SET DBFLOCKSCHEME TO 3
RETURN NIL
I had some problems like yours up to time when I wrote this line
SET DBFLOCKSCHEME TO 3[/quote]
Wow ! Interesting ! Here is mine :
Code: Select all
ANNOUNCE RDDSYS
REQUEST DBFCDX
function Main()
RddSetDefault( "DBFCDX" )
SET MULTIPLE OFF
SET SCOREBOARD OFF
SET EXCLUSIVE OFF
SET DELETED ON
SET SOFTSEEK OFF
SET AUTOPEN OFF
SET CENTURY ON
SET DATE ANSI
SET EPOCH TO 2000
SET CONFIRM ON
SET ESCAPE ON
SET WRAP ON
SET DATE FORMAT TO "YYYY.MM.DD"
SET DBFLOCKSCHEME TO 2
Regards !
Rimantas U.
Re: Limitation of open files ...
James , no errors . Customer asked me to do something like archive of old making data . Making data are in 3 dbfs + 3 cdxs . I did 3 new dbfs with 3 cdx analogs to the the main dbfs . Then wroted some code and customer can old data of needful period to transfer to this 3 new dbfs . All is working fine . In menu customer can choose to view/modify data of making as actual period or go to old period data . I use the same mdi child with browse , only from menu I'm passing one parameter to this part of apllication . function makingData( lOldData ) . Then are 3 vars as alias :James Bott wrote: Are you getting an error, and if so, what is it?
cMakingPok := if( lOldData, "MAK_OLD", "MAK_POK" ) and etc ... in browses I use codeBlock ( Hernans browse ) :
{ || ( cMakingPok )->DATA } ...
In mine PC all is working OK , in enterprise server all is working OK , in 2 PC of users in network all is working OK . IN others PC - empty browse - no lines . No errors ... Something mistical ... The first mind was about limitation , but it seems that this isn't true .
Regards !
Rimantas U.
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Limitation of open files ...
Rimantas,
> empty browse - no lines . No errors
Maybe there are no records, or no records that meet any filters.
James
> empty browse - no lines . No errors
Maybe there are no records, or no records that meet any filters.
James
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Limitation of open files ...
This is a better test (the above opens only a single file) that still shows no errors:James Bott wrote:Code: Select all
#include "fivewin.ch" function main() local i for i= 1 to 9999 use cust new next ? "done" return nil
Code: Select all
#include "fivewin.ch"
function main()
local i
for i= 1 to 9999
use customer alias ( "test" + ltrim( str( i ) ) ) shared new
next
? "done"
return nil
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Limitation of open files ...
Enrico,
Thanks for pointing that out. My original test looked similar to yours. I tried to simplify it, but broke it as you pointed out.
James
Thanks for pointing that out. My original test looked similar to yours. I tried to simplify it, but broke it as you pointed out.
James
Re: Limitation of open files ...
Solved ... Win 2003 Server security faults ...
Rechecked , renewed - all is working OK ...
With best regards !
Rechecked , renewed - all is working OK ...
With best regards !
Rimantas U.
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Limitation of open files ...
Rimantas,
Great!
Could you explain more what the solution was, so anyone having the same problem later can find the solution here?
Regards,
James
Great!
Could you explain more what the solution was, so anyone having the same problem later can find the solution here?
Regards,
James
Re: Limitation of open files ...
James , I don't know why , but the 3 new dbf files didn't inherited security rights in shared folder . So I added privilleges on this files manually . That is all ...James Bott wrote: Could you explain more what the solution was, so anyone having the same problem later can find the solution here?
Regards !
Rimantas U.