#1
|
||||
|
||||
Too many instances
I am using WM 11.50 with OSDM 11.5 on windows nt 4.0. Periodically I get an error "Too Many Instances" when saving a part, or a drawing.
Has anyone else experienced this? Any ideas as to what customization I can look for that causes this problem? Thanks Tom Kirkman |
#2
|
||||
|
||||
Does the error message come from WorkManager?
What does the full message say (click on the error message to display it's full length) ? Maybe too many cache instances ? |
#3
|
||||
|
||||
too many instances
The error is from workmanager. I have attached a copy of the error window. It does not specifically mention cache.
Thanks Tom |
#4
|
||||
|
||||
Hi Tom,
hope you had a pleasant easter weekend Although the word "cache" is not mentioned, it looks very much like a cache problem to me. A cache is a temporary space in the WM session, where an element from the database is loaded into for either reading, modifying, or deleting. If the same element gets read into cache too often, you might get such a message. So please check your customization for areas where an element gets read into cache (mostly for reading attribute information), but never gets dropped out of the cache memory. Look for combinations of the following commands: Ui_select_element / Ui_drop_element Ui_select_element / Ui_apply_element DMS_SELECT_ELEMENT / DMS_DROP DMS_SELECT_ELEMENT / DMS_APPLY It is likely that the drop-/apply-commands are missing. This might apply to other WM specific elements as well, like e.g. the current user or group, so there are also commands like DMS_SELECT_USER or DMS_SELECT_GROUP to check for. Also, make sure to use proper cache cleanup handling, like e.g. Code:
LET num_cleanups Dms_get_num_cleanups Ui_select_element VIEW l_doc_elid LET l_cid Dms_return_val LET l_name (GET_CACHE_VALUE l_cid Db_default_name) Ui_drop_element l_cid Dms_clear_cleanups_to num_cleanups Last edited by ChrisE; 04-22-2003 at 12:47 AM. |
#5
|
|||
|
|||
too many instances
Probably, you have used open command for read/modification on this element, too many time. (up to 16 times). Cache logical table on this element is full. Perhaps a problem in your macro comand, or in your clean cash ?
|
#6
|
|||
|
|||
Thanks for the replies (I work with Tom). I think we have found the offending portion of our customizations. Anybody ambitous enough to analyze this for us and help us correct it?
DEFINE Awmc_2d3d_i_create_link_elem {---------------------------------------------------------------------------} {---------------------------------------------------------------------------} PARAMETER Doc_elid LOCAL Num_errors LOCAL Ok LOCAL Pkelid LOCAL Pkcid LOCAL Cid LOCAL Elid LOCAL Rcid LOCAL Ret LOCAL Index LOCAL Max_wait LET Max_wait 20 LET Ok 1 CREATE_LTAB "notes__pkt__ltab" SQL_QUERY ("SELECT "+Db_elid+" FROM "+Dbr_elements+" WHERE "+ Db_unique_id_string+" = '"+Db_notes_packet+"'") USER_TABLE "notes__pkt__ltab" END LET Pkelid (READ_LTAB "notes__pkt__ltab" 1 1) LET Num_errors Dms_get_num_errors LET Index 0 LOOP LET Pkcid (DMS_SELECT_ELEMENT UPDATE Pkelid) EXIT_IF ((Pkcid!=ERROR) OR (Index==Max_wait)) IF (Index==0) Awm_ed_m_display_prompt (GET_CURRENT_WINDOW) (CATGETS "awm.cat" 1024 "Please wait, USER_TABLE is being used by another user!") END_IF IF (Index<12) WAIT 0 ELSE WAIT 1 END_IF LET Index (Index+1) END_LOOP IF (Pkcid!=ERROR) Dms_clear_errors Num_errors ELSE_IF (Index>1) Dms_clear_errors (Num_errors+1) END_IF IF ((TYPE Pkcid)!=STRING) LET Ok 0 END_IF IF (Ok) LET Cid (DMS_CREATE_ELEMENT Awmc_val_2d3d_general) IF ((TYPE Cid)!=STRING) LET Ok 0 END_IF END_IF IF (Ok) LET Elid Dms_filter_errors (GET_CACHE_VALUE Cid Db_elid) LET Rcid (DMS_ADD_TO_ELEMENT_SET Pkcid Elid MASTER) LET Num_errors Dms_get_num_errors LET Ret (SET_CACHE_VALUE Cid Db_default_name "2D-3D LINK") IF (Ret!=NO_ERROR) END Dms_clear_errors Num_errors END_IF LET Ret (DMS_APPLY RETAIN Cid) IF (Ret!=NO_ERROR) LET Ret (DMS_DELETE_FROM_ELEMENT_SET Rcid) LET Ret (DMS_DROP Cid) LET Ok 0 END_IF LET Ret (DMS_APPLY FLUSH Pkcid) ELSE_IF ((TYPE Pkcid)==STRING) LET Ret (DMS_DROP Pkcid) END_IF IF (Ok) IF ((DMS_GET_SCHEMA_VERSION)<8) LET Rcid (DMS_ADD_ELE_RELATION Cid Doc_elid) ELSE Lct_get_2d3d_link_class_type Cid Elid Lct_get_2d3d_link_class Cid Doc_elid Anno_2d3d_link_class_type Check_linkclass_in_linkclasstype Anno_2d3d_link_class_type Anno_2d3d_link_class IF (Dms_return_val==1) LET Rcid Dms_filter_errors (DMS_ADD_LINK Cid Doc_elid Anno_2d3d_link_class) ELSE LET Rcid 0 END_IF END_IF IF (Rcid==0) LET Ret (DMS_DELETE Cid) LET Ret (DMS_APPLY FLUSH Cid) LET Ok 0 END_IF END_IF IF (Ok) LET Ret (SET_CACHE_VALUE Rcid Db_view_name Awm_2d3d_val_ltype_drawing) LET Ret (SET_CACHE_VALUE Cid Db_state Awm_2d3d_state_valid) LET Ret (DMS_APPLY RETAIN Cid) IF (Ret!=NO_ERROR) LET Ret (DMS_DELETE Cid) LET Ret (DMS_APPLY FLUSH Cid) LET Ok 0 END_IF END_IF IF (Ok) LET Dms_return_val Cid ELSE LET Dms_return_val ERROR END_IF END_DEFINE |
#7
|
|||
|
|||
I suppose your problem appears when you test your macro ? If an error occurs in your process, the cacheid of your paquet stay open in modification state. To avoid this, you may use cleanups functions. (dms_push_cleanup; dms_clear_cleanups_to and so on)
So, if you use ui_xxxx command, it's easier, because some of them have already "cleanups" inside. Be carreful. By this way, you'll use triggers. Another way is to use toggle_packet_policy. In this case, you could create an element without any paquets. (toggle_packet_policy is a switch command). If you want make a secure transaction, you maight use trans_begin, trans_apply and trans_end command. You have many choici to change your code |
#8
|
||||
|
||||
I doubt this is your point of problem, because the macro looks pretty much original (except for the line where the NAME attribute of the new element is being set (line 58)
If this macro was in error, a lot of customers would have the same problem. Maybe you should contact CoCreate support, and have them analyze a trace of your session. |
#9
|
|||
|
|||
Tried CoCreate; They deferred to the Partner who did the customization. It's been 7 weeks since I sent said partner a copy of our trace logs so he could analyze the problem.
|
#10
|
||||
|
||||
Yes, TOGGLE_PACKET_POLICY would avoid two major problems:
- situation where two people at the same time try to open the notes packet - SLOW performance for larger installations with many 2D3D-link elements and notes (I'd rather setup a different packet for the 2D3D-link elements) If you were to use TOGGLE_PACKET_POLICY, then you would also have to modify the macros where the 2D3D-link elements get modified (e.g. setting the state to invalid as in Awm_2d3d_m_invalidate_links) I don't see the reason why this macro got "customized" - the SET_CACHE_VALUE to the NAME attribute works in both ways (unless the Db_default_name macro got modified, or the message catalog manipulated) |
#11
|
||||
|
||||
Send me a copy of the trace so I get an idea at what point WM freaks out.
Maybe we have a chance ... (if it won't take me too long to analyze it - I'm not on the CoCreate pay roll ) |
#12
|
|||
|
|||
attached....
Thanks! |
#13
|
||||
|
||||
Quote:
|
#14
|
|||
|
|||
Try again....
|
#15
|
|||
|
|||
Friggin !@#%!#$! Ok, attaching the trace.txt fle doesn't seem to want to go. Anybody got any other suggestions? |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|