所以,我知道这意味着什么。我知道问题出在哪里。但这是我的问题。我有一个控制应用程序在由系统管理员管理的服务器上运行,他拒绝从Windows Server 2003升级。这意味着我无法从.NET Framework 3.5升级到.NET Framework 4.5。服务器也是32位。
我的应用程序是一个32位,多线程和多用途的应用程序。它在我们的oracle数据库,跟踪和跟踪数据库等之间进行交互。将应用程序保持为一体化的决定是高层人员的强制决定,因此目前无法改变。
它运行了几个线程,这些线程并没有真正影响内存,CPU或网络,除了一个分成多个线程的过程,执行以下操作。
它从我们的oracle数据库获取所有数据并带有一些规则
[12:39:09] Tabel 'tsdsmd' synchronisatie is gestart, volgens de regel: 'Select tsdsmd.* from tsdsmd where dosvlg > 100044294 and dosvlg < 109999999'
[12:39:09] Tabel 'tsdnaw' synchronisatie is gestart, volgens de regel: 'Select tsdnaw.* from tsdnaw where dosvlg > 110017149 and dosvlg < 119999999'
[12:39:09] Tabel 'tstrac' synchronisatie is gestart, volgens de regel: 'Select tstrac.* from tstrac where irdvlg = 0 and tsacdt > = '2013-10-01' and ( ( tsacdt > '2013-10-01' ) or ( tsacty > '14:39:00' and tsacdt > = '2013-10-01' ) )'
[12:39:09] Tabel 'tslay4' synchronisatie is gestart, volgens de regel: 'Select tslay4.* from tslay4 where tsprda > '2013-10-02' or ( tsprda = '2013-10-02' and tsprti > '11:59:05' )'
[12:39:09] Tabel 'tsttks' synchronisatie is gestart, volgens de regel: 'Select tsttks.* from tsttks'
[12:39:09] Tabel 'tstrac' synchronisatie is gestart, volgens de regel: 'Select tstrac.* from tstrac where irdvlg = NULL and tsacdt > = '2013-05-06' and ( ( tsacdt > '2013-05-06' ) or ( tsacty > '18:55:00' and tsacdt = '2013-05-06' ) )'
[12:39:09] Tabel 'tsdnaw' synchronisatie is gestart, volgens de regel: 'Select tsdnaw.* from tsdnaw where dosvlg > 100044297 and dosvlg < 109999999'
[12:39:09] Tabel 'tsdsmd' synchronisatie is gestart, volgens de regel: 'Select tsdsmd.* from tsdsmd where dosvlg > 110017149 and dosvlg < 119999999'
[12:39:09] Tabel 'tsartc' synchronisatie is gestart, volgens de regel: 'Select tsartc.* from tsartc where rnropd <> 10003254 and rnropd <> 10004964 and rnropd <> 10005050 and rnropd <> 10005882 and rnropd <> 10006505 and rnropd <> 24232743'
[12:39:09] Tabel 'vrarst' synchronisatie is gestart, volgens de regel: 'Select vrarst.* from vrarst left outer join ( select * from tsarkm where tsarkm.tskenm = 3005 ) tsarkm3005 on vrarst.rnropd = tsarkm3005.rnropd and vrarst.artkd = tsarkm3005.artkd where tsarkm3005.tskenm = '' and ( rnropd = 10006584 or rnropd = 10001012 or rnropd = 10006634 or rnropd = 10006484 or rnropd = 10006296 or rnropd = 10025 or rnropd = 10002297 or rnropd = 10004544 or rnropd = 10006469 or rnropd = 29000000 or rnropd = 10001015 or rnropd = 10007544 or rnropd = 10007614 )'
[12:39:09] Tabel 'tstrac' synchronisatie is gestart, volgens de regel: 'Select tstrac.* from tstrac where irdvlg = 0 and tsacdt > = '2013-08-12' and ( ( tsacdt > '2013-08-12' ) or ( tsacty > '13:49:00' and tsacdt = '2013-08-12' ) )'
[12:39:09] Tabel 'tslay4' synchronisatie is gestart, volgens de regel: 'Select tslay4.* from tslay4 where tsprda > '2013-10-02' or ( tsprda = '2013-10-02' and tsprti > '12:23:32' )'
[12:39:09] Tabel 'tsttks' synchronisatie is gestart, volgens de regel: 'Select tsttks.* from tsttks'
[12:39:09] Tabel 'tstrac' synchronisatie is gestart, volgens de regel: 'Select tstrac.* from tstrac where irdvlg = NULL and tsacdt > = '2013-10-02' and ( ( tsacdt > '2013-10-02' ) or ( tsacty > '11:12:00' and tsacdt = '2013-10-02' ) )'
[12:39:09] [Environment02] Tabel 'tsdsmd' synchronisatie is niet gestart omdat deze niet aan staat voor deze tabel
[12:39:09] [Environment02] Tabel 'tsdsmd' synchronisatie is niet gestart omdat deze niet aan staat voor deze tabel
[12:39:09] [Environment02] Tabel 'tsdnaw' synchronisatie is niet gestart omdat deze niet aan staat voor deze tabel
[12:39:09] [Environment02] Tabel 'tsdnaw' synchronisatie is niet gestart omdat deze niet aan staat voor deze tabel
[12:39:09] Tabel 'vrfvrd' synchronisatie is gestart, volgens de regel: 'Select vrfvrd.* from vrfvrd where vrfilk = 1 and rnropd <> 10003254 and rnropd <> 10004964 and rnropd <> 10005050 and rnropd <> 10005882 and rnropd <> 10006505 and rnropd <> 24232743 and vrvrdt = 0'
[12:39:09] Tabel 'tsdsmd' synchronisatie is gestart, volgens de regel: 'Select tsdsmd.* from tsdsmd where dosvlg > 36910060 and dosvlg < 36999999'
[12:39:10] Tabel 'tsdsmd' synchronisatie is gestart, volgens de regel: 'Select tsdsmd.* from tsdsmd where dosvlg > 46504450 and dosvlg < 46699999'
为了防止线程运行超过15分钟,我们将一些规则拆分为两个,动态范围在完成当前线程后得到更新。
所以我测量的是网络负载大约是10米/位〜这很好。 CPU负载已优化。它做了很多事情,并没有给处理器带来任何压力,因此应用程序不会减速或停止或类似的事情。
问题是该应用程序是32位,运行Windows Server 2003和.NET Framework 3.5。它有4 GB的RAM。并且该应用程序通常在此线程中使用最多1.0~1.5 GB。在该范围内的某个地方,应用程序抛出异常并阻止我继续该程序,即使我已经尝试通过简单地结束威胁来处理异常但不幸的是异常强制应用程序退出(或者在极少数情况下抛出一个断点错误)然后冻结。)。
显然,将.NET升级到4.5是不可能的。 我查看了查询规则并发现我需要带有*的所有列,这会返回大量数据,所以我无法降低那里的内存负载......
tl; dr:可以通过编程方式做些什么来更有效地利用可用内存。或者我怎样才能以这种方式增加记忆?
编辑:看起来我发现应用程序本身存在问题。它应该更新规则,但由于某种原因,以下规则没有更新:
'Select tstrac.* from tstrac where irdvlg = 0 and tsacdt > = '2013-08-12' and ( ( tsacdt > '2013-08-12' ) or ( tsacty > '13:49:00' and tsacdt = '2013-08-12' ) )'
随着时间的推移,所有这些跟踪和跟踪消息都不断增加到这个查询单独占用大约1,2 Gig内存的程度。无论如何,这里给出的答案都会牢记在心,因为它们既有洞察力又有帮助。